DELETE

Remove Users from a Team

Removes one or more users from the specified team.

Endpoint

DELETE v5/accountteams/{team_id}/users

Requires authentication

Path Parameters

The team from which users will be removed.

team_id
string
required
The ID of the team to remove users from.

Body

An array of user IDs identifying the users to remove from the team.

user_ids
array
required
Array of user ID strings identifying the users to remove from the team.

Response

Returns overall status and per-user result objects in the data array.

result_ok
boolean
Whether the overall request succeeded.
code
integer
Status code. 200 = success, 400 = error.
message
string
A message describing the result.
data
array
An array of per-user result objects.

Examples

Request (cURL)
curl -X DELETE "https://api.alchemer.com/v5/accountteams/YOUR_TEAM_ID/users?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "user_ids": [
      "YOUR_USER_ID"
    ]
  }'
Success Response
{
  "result_ok": true,
  "code": 200,
  "message": "Removed 1 users from team.",
  "data": [
    {
      "user_id": "YOUR_USER_ID",
      "result_ok": true,
      "code": 200,
      "message": "Removed user from team."
    }
  ]
}
Error Response
{
  "result_ok": false,
  "code": 400,
  "message": "Failed to remove all users from team. See data for details.",
  "data": [
    {
      "user_id": "YOUR_USER_ID",
      "result_ok": false,
      "code": 400,
      "message": "Failed to remove user from team. User id YOUR_USER_ID not found."
    }
  ]
}