Skip to main content
Version: Current

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​

ParameterTypeRequirementDescription
firstNamestringSee notesUser first name.
lastNamestringSee notesUser last name.
emailAddressstringSee notesEmail address associated with the account.
userNamestringSee notesUser name used to sign in or select tasks.
pwdstringSee notesPassword for the new user.
rolesarraySee notesRoles to assign. Each item contains a roleId; obtain role IDs from your administrator.
fullNamestringSee notesDisplay name of the user.
isEnabledbooleanSee notesWhether 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.

FieldExample typeDescription
userIdintegerID of the user.
tenantIdintegerID of the tenant.
isEnabledbooleanWhether the resource is enabled.

Errors​

Endpoint-specific error statuses and response bodies are not yet documented. See Usage and troubleshooting for general handling guidance.