Create User API
Learn how to create a new user through the /v1/cl2c/user endpoint
The POST /v1/cl2c/user
API endpoint allows you to create a new user. This requires specifying essential user details such as firstName
, lastName
, email
, userName
, and phoneNumber
within the request body. Authentication headers including tenant
and X-API-Key
are required to ensure secure access.
Endpoint
POST
/v1/cl2c/user
Creates a new user with the provided details.
Parameters
Name | Type | Location | Required | Description |
---|---|---|---|---|
tenant | string | Header | Yes | Tenant ID for accessing this API. |
X-API-Key | string | Header | Yes | API Key ID for accessing this API. |
Request Body
Content Type: application/json
Example Request Body
Schema
Field | Type | Description |
---|---|---|
firstName | string | The first name of the user. |
lastName | string | The last name of the user. |
string | User's email address. | |
userName | string | Unique username for the user. |
phoneNumber | string | Contact number of the user. |
Responses
Success (200)
Content Type: application/json
Example Response
Error (400)
Content Type: application/json
Example Error Response
Code Samples
Usage in Different Frameworks
Node.js Example