Create a user
post/api/v1/usersCreates a new user and returns the created user's ID upon a successful API call.
Code snippet
curl -X 'POST' \
'https://{yourdomain}/api/v1/users' \
-H 'accept: text/plain; x-api-version=1.0' \
-H 'x-api-key: {your API key}' \
-H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
-d '{
"data": {
"firstName": "John",
"lastName": "Smith",
"emailAddress": "[email protected]",
"reportsTo": {
"id": 101
},
"role": {
"id": 2
},
"permissionSet": {
"id": 1
},
"timezone": {
"id": 15
}
}
}'
Request body
| firstNamestringRequired | First name of the user. Used for display purposes and identification within the organization. | ||
| lastNamestring | Last name of the user. Combined with first name for full display name and identification. | ||
| emailAddressstringRequired | Email address for the user account. Must be unique and will be used for login authentication. | ||
reportsToobject | Manager or supervisor that this user reports to in the organizational hierarchy.
| ||
roleobject | Role assignment that defines the user's job function and responsibilities.
| ||
permissionSetobjectRequired | Permission set that defines access levels and capabilities for the user account.
| ||
timezoneobject | The user's time zone, used to display dates and times in local time.
|
Example response
201 Created
{
"message": "User account created. An invitation email has been sent.",
"data": {
"id": 1234
}
}