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 username of the user
userStateenumOptionalThe state of the user; Needed for blocking and unblocking Default: active Values: active,disabled, archived, inexistent
languageCodestringOptionalThe language of the user Default: en
extIdstringOptionalThe identifier of the user Default: Generated UUID Important Can only be set on creation.
name.titlestringOptionalThe title of the user
name.firstNamestringOptionalThe first name of the user
name.familyNamestringOptionalThe 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.mobilestringOptionalThe mobile number of the user in E.164 format starting with the plus + sign and having no spaces
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
contacts.emailstringOptionalThe email of the user
validity.fromstringOptionalThe start date of the user validity period in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
validity.tostringOptionalThe end date of the user validity period in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
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 extId of the created user:

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

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.