Skip to main content

Bulk Activate Users

POST /clients/{client_id}/users/activate

Reactivate one or more archived users. Historical data is seamlessly rejoined. This operation is idempotent -- activating an already-active user is treated as a success.

Path Parameters

ParameterTypeDescription
client_idstring (uuid)Unique identifier for the client organization

Request Body

FieldTypeRequiredDescription
user_idsstring (uuid)[]YesList of user IDs to activate

Example Request Body

{
"user_ids": [
"a1d97031-04e2-4907-a249-093f7436207b",
"b2e08142-15f3-5018-b350-104g8547318c"
]
}

Response

Returns a BulkUserControlResult with status 200 OK.

All succeeded

{
"succeeded": [
"a1d97031-04e2-4907-a249-093f7436207b",
"b2e08142-15f3-5018-b350-104g8547318c"
],
"failed": []
}

Partial success -- deleted user cannot be activated

{
"succeeded": [
"a1d97031-04e2-4907-a249-093f7436207b"
],
"failed": [
{
"id": "b2e08142-15f3-5018-b350-104g8547318c",
"error": "Cannot reactivate a deleted user"
}
]
}

Business Rules

  • Atomic per-user -- one failure does not roll back others.
  • Activating an already-active user succeeds (idempotent).
  • Deleted users cannot be activated (reported in failed).
  • If the client is deleted, the entire operation is rejected (400).
  • One audit log entry created per affected user.
  • Scales to 10,000 users.

Example Request

curl -X POST "https://api.example.com/v2/clients/aa7cf840-9ca9-46a3-9778-9015d6580d50/users/activate" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_ids": [
"a1d97031-04e2-4907-a249-093f7436207b"
]
}'

Error Responses

StatusDescription
400Invalid request (empty user_ids, client is deleted)
401Authentication required
403Insufficient permissions for this client
404Client not found
500Server error