The auto-generated unique identifier for the new user
Create User
Create a new user account
POST
/users Overview
Creates a new user account with the provided information. Returns the created user object with a generated ID.
Authorization
Warning
This endpoint requires authentication. Include a valid Bearer token in the Authorization header.
Request Body
Body Parameters
name
required
Full name of the user
email
required
Email address of the user. Must be a valid email format.
username Unique username for the user. If not provided, will be auto-generated.
phone Phone number of the user
website Personal website URL
Response
Returns the created user object with the assigned ID.
id integer name string The name provided in the request
email string The email address provided in the request
Example Request
{ "name": "John Doe", "email": "john@example.com", "username": "johndoe", "phone": "555-1234"}Example Response
{ "id": 11, "name": "John Doe", "email": "john@example.com", "username": "johndoe", "phone": "555-1234"}Error Responses
| Status | Description |
|---|---|
400 | Invalid request body - missing required fields |
401 | Unauthorized - missing or invalid authentication |
409 | Conflict - user with this email already exists |
Try it out
POST
/users Authorization
Bearer Token