Deactivate User
Deactivate a platform user account.
POST
/api/v1/users/{id}/deactivateDescription
Sets is_blocked on a registered user. The default company user cannot be deactivated.
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer <access_token> | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Pass the full value from the API response in path parameters. |
Response
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request succeeded. |
| message | string | Human-readable confirmation. |
| status | number | 0 when deactivated. |
| is_blocked | number | 1 when the account is blocked. |
| account_status | string | Inactive after deactivation. |
| user | object | Updated user record. |
| user.id | string | null | User ID when the invitee has a registered account; null for pending invites. |
| user.email | string | User or invitee email address. |
| user.name | string | null | Display name when known. |
| user.country | string | Country code. |
| user.role | number | Corporate role: 1=Department head, 2=Manager, 3=Requester. |
| user.role_name | string | Human-readable role label. |
| user.account_status | string | Active, Inactive, or Pending. |
| user.is_blocked | number | 1 when the account is blocked/deactivated; 0 otherwise. |
| user.is_default_user | boolean | True for the company's default Unduit admin user. |
| user.status | number | 0 when deactivated. |
Related Endpoints
Did this page help you?
Request
curl -X POST https://uat.unduit.com/api-exposed/api/v1/users/9119562-42/deactivate \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json"Success Response
{
"success": true,
"message": "User deactivated successfully.",
"status": 0,
"is_blocked": 1,
"account_status": "Inactive",
"user": {
"id": "9119562-42",
"email": "user@example.com",
"name": "Jane Smith",
"country": "US",
"role": 3,
"role_name": "Requester",
"account_status": "Inactive",
"is_blocked": 1,
"is_default_user": false,
"status": 0
}
}