Add a User
  • 24 Oct 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Add a User

  • Dark
    Light
  • PDF

Article summary

Users

POST /user

NameData TypeDescription
Content-type:application/jsonfor all requests
Authorization:EAPI {token}for all requests

Body Parameters

Parameters indicated with a * are mandatory

Name
Data Type
Description
ExternalId*string (64)Unique id of the user, the externalID corresponds with the 'User ID' within the usermanagement. This field is mandatory only for users when the 'Participate' option is enabled for their role
LastName*string (500)Last name of the user
FirstName*string (500)First name of the user
Emailstring (100)example: cirrus_user@gmail.com
UserNamestring (50)example: cirrus_user
Rolestring (500)Title of role in the Cirrus system. It have to be existing role.
Photostring (500)example: https://cirrusplatform.com/static/img/default-avatar.png
DateOfBirthstring (10)YYYY-MM-DD or YYYYMMDD example: 1988-05-03
Companystring (100)Company name, example: Cirrus assessment
CountryCodestring (20)example: EN
Statestring (50)example: LA
Citystring (50)example: London
PostalCodestring (50)example: 12345A
PostalAddressstring (500)example: Platform 9 3/4, Hogwarts
AddressLine1string (500)example: Address line 1
AddressLine2string (500)example: Address line 2
PhoneNumberstring (50)example: 345 123 234
CellularPhonestring (50)example: +534 64538 7665
SpecialNeedsbooleanDetermines whether the user is given extra time in exams
ReasonableAdjustmentPercentageintSetup a % to add extra time, for example 20% on 60 min will result in 12 min extra time. Parameter can only be sent if SpecialNeeds=true
EnableReadSpeakerbooleanDetermines whether the user is able to use ReadSpeaker in exams (Available only if ReadSpeaker is switched on for the customer)
DisableLoginbooleanDetermines whether the user is able to login to Cirrus system with username and passwordf
DisablePasswordResetbooleanDetermines whether the user is able to reset his password
SynchronizationKey (Deprecated)string guid (64)Deprecated: SynchronizationKey is no longer in use (and only kept for backward compatibility). example: 0c824cc1-8294-4857-81cb-8327d83df554
Labelsstring (100)example: Label 1
AllowedIpAddressesstring (34)Determines from which IP addresses the user can log into the system
Passwordstring (500)minimum length: 5; example: 12345
Hierarchies.ExternalId*String(64)external ID
Hierarchies.IsCoordinatorbooleanminimum length: 5; example: 12345
Hierarchies.IsAdministratorbooleanminimum length: 5; example: 12345
Hierarchies.HasViewReportsPermissionsbooleanminimum length: 5; example: 12345
Hierarchies.HasReScoringPermissionsbooleanminimum length: 5; example: 12345
Hierarchies.ActionString (64)Possible values: UPSERT, DELETE default UPSERT

Sample Request URL

https://api.cirrusplatform.com/api/v1/integrations/user

Sample Request

{
  "ExternalId": "cirrus_user_ext_id",
  "LastName": "Miller",
  "FirstName": "John",
  "Email": "cirrus_user@gmail.com",
  "UserName": "cirrus_user",
  "Role": "string",
  "Photo": "https://cirrusplatform.com/static/img/default-avatar.png",
  "DateOfBirth": "1988-05-03",
  "Company": "Cirrus",
  "CountryCode": "EN",
  "State": "LA",
  "City": "London",
  "PostalCode": "12345A",
  "PostalAddress": "Platform 9 3/4, Hogwarts",
  "AddressLine1": "Address line 1",
  "AddressLine2": "Address line 1",
  "PhoneNumber": "345 123 234",
  "CellularPhone": "+534 64538 7665",
  "SpecialNeeds": true,
  "ReasonableAdjustmentPercentage": 20,
  "EnableReadSpeaker": true,
  "DisableLogin": true,
  "DisablePasswordReset": true,
  "SynchronizationKey": "0c824cc1-8294-4857-81cb-8327d83df554",
  "Labels": [
    "Label 1"
  ],
  "AllowedIpAddresses": [
    "192.168.1.1"
  ],
  "Password": "12345",
  "Hierarchies": [
    {
      "ExternalId": "cirrus_group_ext_id",
      "IsCoordinator": true,
      "IsAdministrator": true,
      "HasViewReportsPermissions": true,
      "HasReScoringPermissions": true,
      "Action": "UPSERT"
    }
  ]
}

Sample Response

{
  "Success": true,
  "Errors": null,
  "Content": {
    "User": {
      "ExternalId": "cirrus_user_ext_id",
      "LastName": "Miller",
      "FirstName": "John",
      "Email": "cirrus_user@gmail.com",
      "UserName": "cirrus_user",
      "Role": "string",
      "Photo": "https://cirrusplatform.com/static/img/default-avatar.png",
      "DateOfBirth": "1988-05-03",
      "Company": "Cirrus",
      "CountryCode": "EN",
      "State": "LA",
      "City": "London",
      "PostalCode": "12345A",
      "PostalAddress": "Platform 9 3/4, Hogwarts",
      "AddressLine1": "Address line 1",
      "AddressLine2": "Address line 1",
      "PhoneNumber": "345 123 234",
      "CellularPhone": "+534 64538 7665",
      "SpecialNeeds": true,
      "ReasonableAdjustmentPercentage": 20,
      "EnableReadSpeaker": true,
      "DisableLogin": true,
      "DisablePasswordReset": true,
      "SynchronizationKey": "0c824cc1-8294-4857-81cb-8327d83df554",
      "Labels": [
        "Label 1"
      ],
      "AllowedIpAddresses": [
        "192.168.1.1"
      ]
    },
    "GroupErrors": [
      {
        "ExternalId": "group_ext_1",
        "Code": 131,
        "Error": "Hierarchy was not found"
      }
    ]
  }
}

Response codes

CodeDescription
200Successful operation
403Not allowed to use external API
400Possible error codes:
102: Unknown error
130: Root hierarchy was not found
133: Permissions can not be set for hierarchy
202: User has not been found
206: User ExternalId can not be null or empty
209: User Email must be valid email address
210: FirstName can not be null or empty
211: FirstName can not contain more than 500 chars
212: LastName can not be null or empty
213: LastName can not contain more than 500 chars
214: User with the same UserName already exists
218: ExternalId can not have more than 64 chars
219: ExternalId can have only [-_a-zA-Z0-9@] chars
220: CellularPhone can not contain more than 50 chars
221: PhoneNumber can not contain more than 50 chars
222: AddressLine1 can not contain more than 500 chars
223: AddressLine2 can not contain more than 500 chars
224: PostalCode can not contain more than 50 chars
225: PostalAddress can not contain more than 500 chars
226: UserName can not contain spaces or have more than 50 chars
227: Company can not contain more than 100 chars
228: City can not contain more than 50 chars
229: State can not contain more than 50 chars
230: CountryCode can not contain more than 20 chars
231: SynchronizationKey have to be valid guid
232: User with the same SynchronizationKey is already exists
233: User with the same ExternalId is already exists
234: Count of labels can not be greater than 20
235: Lables can not be empty or have more than 100 chars
236: Labels contain duplicates
237: Count of AllowedIpAddresses can not be greater than 100
238: AllowedIpAddresses must be list of valid IPs or IP ranges
239: AllowedIpAddresses contain duplicates
240: Role is null or empty
241: Role with selected title was not found
242: Hierarchies contain nulls
243: Hierarchies contain duplicates
244: Herarchies contain invalid actions
245: Profile photo could not be loaded. Photo have to be valid url
246: DateOfBirth have to have YYYY-MM-DD or YYYYMMDD formats
247: Password can not contain less than 5 and more than 500 chars
249: ReasonableAdjustmentPercentage is invalid. Must be a value between 0 and 999
250: ReasonableAdjustmentPercentage cannot be set for candidate with SpecialNeeds = false
1134: Hierarchy must be active
500Internal server error


Was this article helpful?

What's Next