API ReferenceUsers
Disable User
Deactivate a user account, preventing authentication while preserving all data.
Endpoint
POST /v1/identities/{id}:deactivateBase URL: https://api-id.avnology.net
Authentication: API Key or OAuth token with admin:users:write scope
Deactivates a user identity, setting its state to inactive. The user cannot log in while deactivated but all data and sessions are preserved. Existing sessions are not automatically revoked.
Request
Example Request
curl
Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Reason for deactivation (stored in audit log) |
Response
Success (200 OK)
Returns the updated user object with state: "inactive".
{
"id": "usr_4f18acec-2712-4be7-a9af-b063b4f6deba",
"state": "inactive",
"..."
}Errors
| Status | Code | Description |
|---|---|---|
| 404 | AVNOLOGY_AUTH_901 | User not found |
| 403 | AVNOLOGY_AUTH_100 | Insufficient permissions |
Related
- Enable User -- reactivate a disabled user
- Delete User -- permanently delete
- SDK:
client.admin.deactivateUser(userId, reason)(TypeScript)