Skip to main content

Create user

The endpoint provides functionality to create a user.

HTTP request

POST https://$instanceId.id.nevis.cloud/nevis/api/v1/users

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance

Request body

A user can be created by only providing the loginId.

ParameterTypeRequired / OptionalDescription
loginIdstringRequiredThe email of the user
languageCodestringOptionalThe language of the user Default: en
name.titlestringOptionalThe title of the user
name.firstNamestringOptionalThe first name of the user
name.lastNamestringOptionalThe last name of the user
genderenumOptionalThe gender of the user Values: female, male, other
birthDatestringOptionalThe birth date of the user in ISO 8601 date format YYYYY-MM-DD
address.countryCodestringOptionalThe country code of the user in ISO 3166-1 format
address.citystringOptionalThe city of the user's address
address.postalCodestringOptionalThe postal code of the user
address.addressline1stringOptionalFirst free text for supplementary address information of the user
address.addressline2stringOptionalSecond free text for supplementary address information of the user
address.streetstringOptionalThe street of the user
address.houseNumberstringOptionalThe house number of the user
address.dwellingNumberstringOptionalThe dwelling number of the user
address.postOfficeBoxTextstringOptionalThe post office box text of the user
address.postOfficeBoxNumberstringOptionalThe post office box number of the user
address.localitystringOptionalThe locality of the user address
contacts.telephonestringOptionalThe landline telephone number of the user in E.164 format starting with the + sign, with no spaces
contacts.telefaxstringOptionalThe telefax number of the user in E.164 format starting with the + sign, with no spaces
remarksstringOptionalThe short metadata; Additional information field for the user Example Remarks to a food delivery
modificationCommentstringOptionalAdditional metadata regarding user modification Note This can be seen in the history.
propertiesmap<string,string>OptionalCustom 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.

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

The userId is a generated UUID.

On failure

HTTP/1.1 401 is returned if the authorization fails due to an invalid access key.

HTTP/1.1 422 is returned if invalid request content is given.

HTTP/1.1 500 is returned if an unexpected error occurs.