Delete User
Delete a dashboard user.
WARNING
Requires super-admin role.
Endpoint
INFO
DELETE /api/v1/dashboard/users/{user}
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
user | integer | User ID |
Example Request
bash
curl -X DELETE https://api.daakey.com/api/v1/dashboard/users/10 \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "User deleted",
"data": null,
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Error (400)
json
{
"success": false,
"message": "Cannot delete user",
"data": {
"reason": "Cannot delete your own account"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Cannot delete your own account
- Consider deactivating instead of deleting