Skip to main content

Create custom scope

The endpoint provides functionality to create a custom scope.

HTTP request

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

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance

Request body

ParameterTypeRequired / OptionalDescription
namestringRequiredThe name of the custom scope. Constraint: The name must be unique, contain only alphanumeric characters and underscores, and have a maximum length of 30 characters.
descriptionstringOptionalThe description of the custom scope. Constraint: The description must have a maximum length of 120 characters.

Example request

name=your_custom_scope
curl --request POST "https://$instanceId.id.nevis.cloud/nevis/api/v1/scopes" \
--header "Authorization: Bearer $accessKey" \
--header "Content-Type: application/json" \
--data "{ \"name\" : \"$name\" }"

HTTP response

On success

HTTP/1.1 201 is returned if the custom scope is successfully created.

The response has the following additional header Location, containing the scopeId of the created custom scope:

https://$instanceId.id.nevis.cloud/nevis/api/v1/scopes/$scopeId

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.