Deactivate a user within an organization, preserving their role and department assignments for potential reactivation.
POSThttps://api.aitronos.com/v1/organizations/{organization_id}/users/{user_id}/deactivate
Sets the user's status to inactive. Their roles and department memberships are preserved so they can be reactivated later. A target department must be specified for resource transfer.
organization_id string required
The unique identifier of the organization (format: org_*).
user_id string required
The unique identifier of the user to deactivate (format: usr_*).
transfer_resources_to_department_id string required
The ID of the department to transfer the user's resources to (format: dept_*).
The updated user object with account_state set to "deactivated".
cURL
- Bash
- Python
- Python
- JavaScript
curl -X POST https://api.aitronos.com/v1/organizations/org_xyz789/users/usr_abc123/deactivate \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"transfer_resources_to_department_id": "dept_eng001"
}'