Delete User
Permanently delete a user from your organization. This will remove the user account and revoke all their access.
Request
DELETE https://api.entryguard.io/api/v1/users/{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 user to delete |
Response
Success Response
Status Code: 204 No Content
No response body is returned on successful deletion.
Error Responses
| Status Code | Description |
|---|---|
400 Bad Request | Attempting to delete the last organization admin |
401 Unauthorized | Missing or invalid authentication token |
403 Forbidden | User does not have ORG_ADMIN role |
404 Not Found | User 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": 400,
"error": "Bad Request",
"message": "Cannot delete the last organization admin",
"path": "/api/v1/users/770e8400-e29b-41d4-a716-446655440003"
}
{
"timestamp": "2026-02-18T10:30:00Z",
"status": 404,
"error": "Not Found",
"message": "User not found with id: 770e8400-e29b-41d4-a716-446655440004",
"path": "/api/v1/users/770e8400-e29b-41d4-a716-446655440004"
}
Example
Request
curl -X DELETE https://api.entryguard.io/api/v1/users/770e8400-e29b-41d4-a716-446655440004 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Response
HTTP/1.1 204 No Content
Notes
- Deleting a user will remove them from all roles
- Active sessions from the deleted user will be terminated
- This operation cannot be undone
- You cannot delete the last organization admin (must have at least one admin)
- The deleted user's email address can be reused to create a new user