DELETE

Delete User from Teams

Removes the subject user from one or more specified teams.

Endpoint

DELETE v5/accountuser/{user_id}/teams

Requires authentication

Path Parameters

Identifies which user will be removed from the specified teams.

user_id
string
required
The user ID of the user that is the subject of this call.

Body

An array of team IDs indicating which teams to remove the user from.

team_ids
array
required
Array of team ID strings identifying the teams to remove the user from.

Response

Returns an overall success/fail status plus per-team result objects.

result_ok
boolean
Whether the overall request was successful.
code
integer
Status code. 200 = success, 400 = error.
message
string
A message describing the result.
data
array
Array of result status objects for each team processed.

Examples

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