Create User
Overview
Create a user and assign roles in AI Command Center.
Endpoint
POST /api/user/create
Use the service origin described in Getting started. The path above already includes /api.
Authentication
Send the access token obtained from Get Access Token in the Authorization header. Access is limited by the authenticated account’s permissions.
Request headers
Accept: application/json
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
Request body
| Parameter | Type | Requirement | Description |
|---|---|---|---|
firstName | string | See notes | User first name. |
lastName | string | See notes | User last name. |
emailAddress | string | See notes | Email address associated with the account. |
userName | string | See notes | User name used to sign in or select tasks. |
pwd | string | See notes | Password for the new user. |
roles | array | See notes | Roles to assign. Each item contains a roleId; obtain role IDs from your administrator. |
fullName | string | See notes | Display name of the user. |
isEnabled | boolean | See notes | Whether the resource is enabled. |
Types reflect the example below. Unless marked required, field requirements, defaults, and validation limits need confirmation for your deployed version.
{
"firstName": "Alex",
"lastName": "Example",
"emailAddress": "partner@example.com",
"userName": "extuser",
"pwd": "REDACTED",
"roles": [
{
"roleId": 1
}
],
"fullName": "extuser",
"isEnabled": true
}
Request example
The following example uses cURL in a POSIX shell. Replace example credentials and IDs before running it. Replace the AI Command Center origin with your deployment address.
curl --request POST \
--url 'https://command-center.example.com/api/user/create' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Alex",
"lastName": "Example",
"emailAddress": "partner@example.com",
"userName": "extuser",
"pwd": "REDACTED",
"roles": [
{
"roleId": 1
}
],
"fullName": "extuser",
"isEnabled": true
}'
Response
Successful status: 200 OK.
The following is an illustrative response with synthetic contact and credential values. Arrays are shortened to one representative item.
{
"userId": 14,
"tenantId": 1,
"firstName": "Alex",
"lastName": "Example",
"emailAddress": "partner@example.com",
"userName": "extuser",
"pwd": "",
"department": null,
"managerId": null,
"isEnabled": true,
"isSystemAccount": false,
"created": "2024-04-11T03:46:35.264804Z",
"modified": "2024-04-11T03:46:35.264804Z",
"createdBy": "Sample User",
"modifiedBy": "Sample User"
}
Response fields
The table describes selected fields in the response. Types reflect the example; this is not an exhaustive schema or nullability contract.
| Field | Example type | Description |
|---|---|---|
userId | integer | ID of the user. |
tenantId | integer | ID of the tenant. |
isEnabled | boolean | Whether the resource is enabled. |
Errors
Endpoint-specific error statuses and response bodies are not yet documented. See Usage and troubleshooting for general handling guidance.