Block user
The endpoint provides functionality to block a user. To revoke this action, see Unblock user.
HTTP request
PUT https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/block
Parameters
Parameter | In | Type | Required / Optional | Description |
---|---|---|---|---|
instanceId | path | string | required | The ID of your Identity Cloud instance |
userId | path | string | required | The ID of the user |
Example request
Set the ID of the user.
userId=your-user-id-123
curl --request PUT "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/block" \
--header "Authorization: Bearer $accessKey"
HTTP response
On success
HTTP/1.1 204
is returned if the user is successfully blocked.
On missing user
HTTP/1.1 404
is returned if no user is found with the given userId
, with a detailed message.
Example response
{
"errors": [
{
"code": "errors.noRecord",
"message": "User with id: 4a5e7346-488b-46f9-914f-79ddb1131e0ba cannot be found."
}
]
}
On unfinished user signup process
HTTP/1.1 422
is returned if the requested user has not finished the signup process.
Example response
{
"errors": [
{
"message": "The state of the user with id: 4a5e7346-488b-46f9-914f-79ddb1131e0ba can be modified only with completed registration."
}
]
}
On failure
HTTP/1.1 401
is returned if the authorization fails due to an invalid access key.
HTTP/1.1 500
is returned if an unexpected error occurs.