Skip to main content

Delete Role

Permanently delete a role from your organization. This will unassign the role from all users and resources, but will not delete the users or resources themselves.

Request

DELETE https://api.entryguard.io/api/v1/roles/{id}

Authentication

Requires a valid Bearer JWT token with ORG_ADMIN role.

Authorization: Bearer <access_token>

Path Parameters

ParameterTypeRequiredDescription
idUUIDYesThe unique identifier of the role to delete

Response

Success Response

Status Code: 204 No Content

No response body is returned on successful deletion.

Error Responses

Status CodeDescription
401 UnauthorizedMissing or invalid authentication token
403 ForbiddenUser does not have ORG_ADMIN role
404 Not FoundRole with the specified ID does not exist in this organization
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer error occurred

Error Response Examples:

{
"timestamp": "2026-02-18T10:30:00Z",
"status": 404,
"error": "Not Found",
"message": "Role not found with id: 550e8400-e29b-41d4-a716-446655440000",
"path": "/api/v1/roles/550e8400-e29b-41d4-a716-446655440000"
}

Example

Request

curl -X DELETE https://api.entryguard.io/api/v1/roles/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Response

HTTP/1.1 204 No Content

Notes

  • Deleting a role will remove it from all users who were assigned to it
  • Users who lose their last role may have restricted access until reassigned to another role
  • Existing sessions from users with this role will continue to run until they expire
  • This operation cannot be undone