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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The 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 Code | Description |
|---|---|
401 Unauthorized | Missing or invalid authentication token |
403 Forbidden | User does not have ORG_ADMIN role |
404 Not Found | Role with the specified ID does not exist in this organization |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Server 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