Avnology ID
API ReferenceUsers

Disable User

Deactivate a user account, preventing authentication while preserving all data.

Endpoint

POST /v1/identities/{id}:deactivate

Base 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

FieldTypeRequiredDescription
reasonstringNoReason 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

StatusCodeDescription
404AVNOLOGY_AUTH_901User not found
403AVNOLOGY_AUTH_100Insufficient permissions
  • Enable User -- reactivate a disabled user
  • Delete User -- permanently delete
  • SDK: client.admin.deactivateUser(userId, reason) (TypeScript)