Create user
The endpoint provides functionality to create a user.
HTTP request
POST https://$instanceId.id.nevis.cloud/nevis/api/v1/users
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
Request body
A user can be created by only providing the loginId
.
Parameter | Type | Required / Optional | Description |
---|---|---|---|
loginId | string | Required | The email of the user |
languageCode | string | Optional | The language of the user Default: en |
userId | string | Optional | The identifier of the user Default: Generated UUID Important Can only be set on creation. |
name.title | string | Optional | The title of the user |
name.firstName | string | Optional | The first name of the user |
name.lastName | string | Optional | The last name of the user |
gender | enum | Optional | The gender of the user Values: female , male , other |
birthDate | string | Optional | The birth date of the user in ISO 8601 date format YYYYY-MM-DD |
address.countryCode | string | Optional | The country code of the user in ISO 3166-1 format |
address.city | string | Optional | The city of the user's address |
address.postalCode | string | Optional | The postal code of the user |
address.addressline1 | string | Optional | First free text for supplementary address information of the user |
address.addressline2 | string | Optional | Second free text for supplementary address information of the user |
address.street | string | Optional | The street of the user |
address.houseNumber | string | Optional | The house number of the user |
address.dwellingNumber | string | Optional | The dwelling number of the user |
address.postOfficeBoxText | string | Optional | The post office box text of the user |
address.postOfficeBoxNumber | string | Optional | The post office box number of the user |
address.locality | string | Optional | The locality of the user address |
contacts.telephone | string | Optional | The landline telephone number of the user in E.164 format starting with the + sign, with no spaces |
contacts.telefax | string | Optional | The telefax number of the user in E.164 format starting with the + sign, with no spaces |
remarks | string | Optional | The short metadata; Additional information field for the user Example Remarks to a food delivery |
modificationComment | string | Optional | Additional metadata regarding user modification Note This can be seen in the history. |
properties | map<string,string> | Optional | Custom attributes of the user Important: You can only create a value for a custom user attribute that is already added. Otherwise, the request will fail. You can request custom user attributes on the management console. For more information, see Custom user attributes. |
Example request
You can set any parameter but at least provide the required loginId
.
loginId=[email protected]
curl --request POST "https://$instanceId.id.nevis.cloud/nevis/api/v1/users" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $accessKey" \
--data "{ \"loginId\" : \"$loginId\" }"
HTTP response
On success
HTTP/1.1 201
is returned if the user is successfully created.
The response has the following additional header Location
, containing the userId
of the created user:
https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId
On failure
HTTP/1.1 401
is returned if the authorization failed due to an invalid access key.
HTTP/1.1 422
is returned if invalid request content was given.
HTTP/1.1 500
is returned if an unexpected error occurred.