Users
Remove a user
Delete a user and revoke all associated sessions.
The Remove User endpoint permanently deletes a user account from the system. This action cannot be undone, and all related sessions, tokens, and associated data will be invalidated.
Endpoint
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
user_id | string | Yes | The unique identifier of the user to delete. |
Headers
Key | Value | Required |
---|---|---|
Authorization | Bearer <access_token> | Yes |
Content-Type | application/json | No |
Response
Successful Response (200 OK)
Field | Type | Description |
---|---|---|
message | string | Confirmation message. |
id | string | ID of the deleted user. |
Error Response (401 / 403 / 404)
Error Code | Meaning |
---|---|
not_found | User does not exist or has already been removed. |
unauthorized | Missing or invalid access token. |
forbidden | Insufficient permissions to delete the user. |
Example Usage
cURL
JavaScript (Fetch)
Deleting a user is irreversible. If you want to temporarily disable access, consider using the PATCH /v1/users/{id} endpoint to update the user’s status to suspended instead.