Skip to content
Last updated

Delete multiple members in a single operation with partial failure handling.

POST/v1/organizations/{organization_id}/users/delete-bulk

organization_id string required

Organization ID

Request Body

user_ids array of strings required

Array of user IDs to delete. Maximum 1,000 members per operation.

Returns

Returns a summary of the operation with details of any failures.

Notes

  • Organization owner is automatically skipped
  • Partial failures are reported
  • Creates audit log entries for successful deletions

Authorization

Requires Admin or Owner role.

Bash
curl -X POST https://api.aitronos.com/v1/organizations/org_abc123/users/delete-bulk \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": [
      "usr_abc123",
      "usr_def456",
      "usr_xyz789"
    ]
  }'

Response:

{
  "success_count": 2,
  "failure_count": 1,
  "failed_operations": [
    {
      "id": "usr_xyz789",
      "error": "Cannot delete organization owner"
    }
  ]
}