Deactivate Users
Deactivate up to 50 users, identified by email address. Deactivated users can no longer sign in and their active sessions are invalidated. They are not deleted and can be restored with Activate Users.
DELETE
/api/public/users/deactivate
Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <Account API Key> |
Request body
| Field | Type | Description |
|---|---|---|
| list_user_email (required) | Array of String | Email addresses of the users to deactivate. Only the first 50 entries are processed. |
{
"list_user_email": ["jane@example.com", "john@example.com"]
}
Example cURL
curl --location --request DELETE '<BUILDER_URL>/api/public/users/deactivate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX' \
--data-raw '{
"list_user_email": ["jane@example.com", "john@example.com"]
}'
Responses
| Status Code | Description | Response |
|---|---|---|
| 200 | Request processed. The body groups the supplied emails by outcome. | application/json |
| 400 | list_user_email is empty | application/json |
| 401 | Unauthorized | application/json |
| 500 | Internal Server Error | application/json |
Response fields
| Field | Type | Description |
|---|---|---|
| users_success | Array of String | Emails of users that were deactivated. |
| users_invalid | Array of String | Entries that are not valid email addresses. |
| users_not_exist | Array of String | Valid emails that do not belong to any user in this account. |
| users_failed | Array of String | Users for whom deactivation failed. |
Sample response
200 : Success
{
"users_success": ["jane@example.com", "john@example.com"],
"users_invalid": [],
"users_failed": [],
"users_not_exist": []
}