This endpoint creates a new user within the currently active account and assigns the specified roles and permissions.
Before user creation, the user’s email domain is validated against the list of mail domains configured for the account. If the domain is not allowed, the request is rejected.
Process overview:
- Validate the user’s email domain against configured account domains
- Create the user through the Identity Provider
- Update account user caches and licensing state
- Return the newly created user details and role information
- Demohttps://demozone.zlinkfm.com/RND/api/v1/account/users/add
curl -i -X POST \
https://demozone.zlinkfm.com/RND/api/v1/account/users/add \
-H 'Content-Type: application/json-patch+json' \
-d '{
"keyword": "string",
"userRoleIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"name": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"phoneNumber1": "string",
"phoneNumber2": "string",
"accountAccess": {
"loginName": "string",
"resetPasswordState": true,
"activationDate": "2019-08-24T14:15:22Z",
"expiryDate": "2019-08-24T14:15:22Z"
},
"status": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string"
},
"email": "string",
"timezone": {
"timezoneId": "ec6fffce-51c8-4aa2-b751-ebde3e12856f",
"timezoneName": "string",
"code": "string",
"supportsDaylightSavingTime": true,
"daylightName": "string"
},
"profilePic": "string",
"userIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"isSSOUser": true,
"userRoles": [
"string"
],
"statusCode": "string",
"team": {
"accountOrgUnitId": "b9e3953d-56f9-4bc0-9b59-60fd4682ccf6",
"levelOrdinal": 0,
"accountOrgUnitName": "string",
"accountOrgUnitCode": "string",
"parentAccountOrgUnitId": "d148c557-9fa6-487a-85c9-8fd3a8f5a469",
"subLevelUnits": [
{}
]
},
"loginName": "string",
"statusDetails": {
"statusId": 0,
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"statusName": "string",
"statusCode": "string",
"statusColor": "string"
},
"isEmployee": true,
"employeeCode": "string",
"isTwoFactorEnabled": true
}'Response
{
"data": {
"userRoleModels": [
{
"userRoleId": "68ac681d-d2dd-4a76-b9b9-ea57ce43a8a0",
"userRoleName": "string",
"noofUsers": 0,
"users": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"name": "string",
"email": "string",
"profilePic": "string"
}
],
"privileges": [
{
"privilegeName": "string",
"privilegeId": "c2edff57-335f-4e4d-a3ce-d70c094d2e4d",
"privilegeCode": "string",
"accessType": {
"accessTypeName": "string",
"accessTypeId": "b821c73a-b3a5-4c7a-83b2-9060601f5845"
},
"accessLevel": {
"accessLevelName": "string",
"accessLevelId": "d31a2944-f80c-46a1-8465-bc82d6938c7a"
},
"accessMode": {
"accessModeName": "string",
"accessModeId": "0af8ccf5-4cd0-4253-b88a-2e7df32f6a62"
},
"responseDescription": "string"
}
],
"isLicensed": true,
"isDefault": true,
"responseDescription": "string"
}
],
"activationDateString": "string",
"expiryDateString": "string",
"responseDescription": "string",
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"name": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"phoneNumber1": "string",
"phoneNumber2": "string",
"accountAccess": {
"loginName": "string",
"resetPasswordState": true,
"activationDate": "2019-08-24T14:15:22Z",
"expiryDate": "2019-08-24T14:15:22Z"
},
"status": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"code": "string"
},
"email": "string",
"timezone": {
"timezoneId": "ec6fffce-51c8-4aa2-b751-ebde3e12856f",
"timezoneName": "string",
"code": "string",
"supportsDaylightSavingTime": true,
"daylightName": "string"
},
"profilePic": "string",
"userIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"isSSOUser": true,
"userRoles": [
"string"
],
"statusCode": "string",
"team": {
"accountOrgUnitId": "b9e3953d-56f9-4bc0-9b59-60fd4682ccf6",
"levelOrdinal": 0,
"accountOrgUnitName": "string",
"accountOrgUnitCode": "string",
"parentAccountOrgUnitId": "d148c557-9fa6-487a-85c9-8fd3a8f5a469",
"subLevelUnits": [
{}
]
},
"loginName": "string",
"statusDetails": {
"statusId": 0,
"uniqueId": "a1e12d74-d756-40d1-9bb3-519def353f44",
"statusName": "string",
"statusCode": "string",
"statusColor": "string"
},
"isEmployee": true,
"employeeCode": "string",
"isTwoFactorEnabled": true
},
"message": "string",
"isError": true,
"messageCode": 0,
"status": "string",
"errorType": "string",
"traceid": "string",
"responseDescription": "string"
}