The create user operation will create a new user with the specified request body.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/users/ |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
Request headers
Header | Description |
---|---|
Content-Type | Required. Must be set to application/json. |
Sample request body
{ "firstName": "Joey", "lastName": "Doe", "userName": "J.Doe", "password": "hfDXpNYLUEGcar[Hh+7)e}N[,Sp*;^jZ", "isEnabled": true, "mustChangePassword": false, "source": "IDP", "adsid": "S-1-5-21-000000000-0000000000-000000000-0000", "contactEmail": "j.doe@email.com", "userAttributes": { "PhoneNumber": "003112300456" } }
Request body parameters
Parameter | Description | Required / Optional | Default value |
---|---|---|---|
{firstName} | First name of the new user | Optional | - |
{lastName} | Last name of the new user | Optional | - |
{userName} | Required. Username of the new user. | Required | - |
{password} | password of the new user. Without the password the user can not sign in to HelloID | Optional | - |
{isEnabled} | Is the new user enabled or disabled | Optional | false |
{mustChangePassword} | Is the user obligated to change the password on the first sign in | Optional | false |
{adsid} | The SID of the new user | Optional | - |
{source} | The source of the user. At this time can be one of: Local, AD, IDP | Optional | - |
{contactEmail} | The contact e-mail address of the new user | Optional | - |
{userAttributes} | Custom attributes of a the new user. Like a Phone Number. You can create new custom attributes by specifying your own key. Example: "userAttributes" : { "customKey" : "value"} | Optional | - |
Generated fields
The following fields will be auto-generated by HelloID: Id, Guid. The new user's source will be set to 'API'.Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful and the resource is created. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed.If there were validation errors, the response will include a error result. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
Please also see error result.
Please also see common HTTP status codes.
Sample response body
{ "userGUID": "ccfc6a05-c79e-42bc-a5db-1dfc969b6de6", "lastLogin": "1970-01-01T00:00:00Z", "source": "Local", "firstName": "Joey", "lastName": "Doe", "userName": "J.Doe", "managedByUserGUID": null, "isEnabled": true, "isDeleted": false, "isLocked": false, "mustChangePassword": false, "lockTime": null, "passwordLastSetTime": "2019-02-21T18:06:56.8077753Z", "immutableId": null, "adsid": null, "contactEmail": "j.doe@email.com", "userAttributes": { "phoneNumber": "003112300456" } }
Link property
The link property is a navigational property. It shows all locations where this resource can be found.Example request with cURL
Replace placeholder values surrounded by {
}
with the actual values.
curl -u {api-key}:{api-secret} -X POST https://{company-name}.helloid.com/api/v1/users/ -H "Content-Type:application/json" -d "{ 'userName': '{userName}', 'firstName': '{firstName}', 'lastName': '{lastName}', 'options': 0, 'isEnabled': {true or false}, 'contactEmail": '{contactEmail}', }"