Create a new user in the system.
| Permission | Description |
|---|---|
users.create | Create users |
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | No | First name (max 255) |
last_name | string | No | Last name (max 255) |
email | string | No | Email (max 255, unique) |
phone | string | Yes | Phone number (unique, E.164 format) |
username | string | Yes | Username (max 255, unique) |
height | integer | No | User's height in CM |
birth_date | date | No | User's birth date |
password | string | Yes | Password (will be hashed) |
Returns the created user resource.
{
"data": { /* user resource */ }
}
See User Resource.
| Status | Description | Reference |
|---|---|---|
| 409 | Email or phone already in use | |
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden | Permission error |