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 |
gender |
string | No | User's gender (male, female, other) |
password |
string | Yes | Password (will be hashed) |
bank_account_number |
string | No | Bank account number (max 50 characters, nullable) |
Returns the created user resource.
{
"data": { /* user resource */ }
}See User Resource.
| Status | Description | Reference |
|---|---|---|
| 409 | Email, phone, or username already in use | |
| 422 | Validation error | Validation error |
| 401 | Unauthorized | Authentication error |
| 403 | Forbidden | Permission error |