Skip to content

Delete role

Request to delete a role:

DELETE /api/v2/roles/<role-id>.json

The role must not be assigned to any user. Assign another role to those users first.

Response contains HTTP status code as shown in the following table.

Response Description
200 OK The role has been successfully deleted
403 Forbidden The request cannot be completed because API user has no permission to delete roles
404 Not Found The ID is not a valid UUID
409 Conflict

The role is still assigned to users:

{"error": "NotEmptyError", "explanation": "Other resources refer to this one", "details": "Cannot delete a role, which has users"}