SuperDocs Demo

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

Request Body

Body Parameters

name required
string

Full name of the user

email required
string

Email address of the user. Must be a valid email format.

username
string

Unique username for the user. If not provided, will be auto-generated.

phone
string

Phone number of the user

website
string

Personal website URL

Response

Returns the created user object with the assigned ID.

id integer

The auto-generated unique identifier for the new user

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

StatusDescription
400Invalid request body - missing required fields
401Unauthorized - missing or invalid authentication
409Conflict - user with this email already exists
Try it out
POST /users
Authorization
Bearer Token