Create Users
This API call is used to create new users.
Note: A limit of 1000 user records are allowed per request to allow processing within request timeout value.
Username and Email Collisions
If you try to create a user with a username or email that is already associated with another user, the operation will fail and return an HTTP status code 400 (Bad Request).
Body
Required
-
userName
string Required The username must be unique within the system and adhere to the specified format requirements.
Minimum length is
2
, maximum length is60
. Format should match the following pattern:^(?=.{2,60}$)(?![.])(?!.*[.]{2})[a-zA-Z0-9._#@-]+(?<![.])$
. -
password
string Required The password must adhere to the password complexity rule.
Minimum length is
8
, maximum length is255
. Format should match the following pattern:^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$
. -
name
object Required -
email
string Required The email address must be unique within the system and adhere to the email format requirements.
Maximum length is
128
. Format should match the following pattern:^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,})$
. -
phoneNumber
string Maximum length is
20
. -
roles
array[object] -
userAccess
object -
departmentId
string This value must be a department code configured in Certification.
Maximum length is
15
. -
locationId
string This value must be a location code configured in Certification.
Maximum length is
15
. -
programAdminRoleId
string This value must be a program admin role configured in Certification.
Maximum length is
15
. -
lockedOut
boolean The user locked out status for accessing the system.
curl \
--request POST 'https://localhost:8080/users' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '[{"name":{"lastName":"User1","firstName":"Test","middleName":"A","displayName":"Test User1"},"email":"testuser1@localhost.local","roles":[{"type":"Close","value":"CloseAdmin"},{"type":"Certification","value":"Reconciler"},{"type":"Certification","value":"ProgramAdmin"},{"type":"JournalEntry","value":"Preparer"}],"password":"Password123!","userName":"testuser1","locationId":"Americas","userAccess":{"r2RAdmin":false,"r2REnabled":true,"accessClose":true,"r2RReadOnly":true,"accessCompliance":true},"phoneNumber":"555-555-5555","departmentId":"SALES","programAdminId":"Admin"},{"name":{"lastName":"User2","firstName":"Test","middleName":"A","displayName":"Test User2"},"email":"testuser2@localhost.local","password":"Password345!","userName":"testuser2"}]'
[
{
"name": {
"lastName": "User1",
"firstName": "Test",
"middleName": "A",
"displayName": "Test User1"
},
"email": "testuser1@localhost.local",
"roles": [
{
"type": "Close",
"value": "CloseAdmin"
},
{
"type": "Certification",
"value": "Reconciler"
},
{
"type": "Certification",
"value": "ProgramAdmin"
},
{
"type": "JournalEntry",
"value": "Preparer"
}
],
"password": "Password123!",
"userName": "testuser1",
"locationId": "Americas",
"userAccess": {
"r2RAdmin": false,
"r2REnabled": true,
"accessClose": true,
"r2RReadOnly": true,
"accessCompliance": true
},
"phoneNumber": "555-555-5555",
"departmentId": "SALES",
"programAdminId": "Admin"
},
{
"name": {
"lastName": "User2",
"firstName": "Test",
"middleName": "A",
"displayName": "Test User2"
},
"email": "testuser2@localhost.local",
"password": "Password345!",
"userName": "testuser2"
}
]
{
"sucessCount": 2,
"failureCount": 0,
"failureResults": [],
"successResults": [
{
"id": "f1666d0e-b1ff-4367-b678-ca711623715c",
"action": "Created",
"username": "testuser1"
},
{
"id": "b8c7fd11-10b5-454d-93a4-c854fcdaae81",
"action": "Created",
"username": "testuser2"
}
],
"totalProcessed": 2
}
{
"sucessCount": 0,
"failureCount": 2,
"failureResults": [
{
"messages": [
"A user with the given username was found.",
"A user with the given email address was found."
],
"username": "testuser1"
},
{
"messages": [
"A user with the given username was found.",
"A user with the given email address was found."
],
"username": "testuser2"
}
],
"successResults": [],
"totalProcessed": 2
}
{
"code": "900901",
"message": "Invalid Credentials",
"description": "Access failure for API: /api/admin/v1.1.0, version: v1.1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"
}