ADD

Add Users to a Team

Adds one or more users to the specified team, assigning each a role and optional team manager status.

Endpoint

PUT v5/accountteams/{team_id}/users

Requires authentication

Path Parameters

The team that users will be added to.

team_id
string
required
The ID of the team to add users to.

Body

An array of user-team objects, one per user to be added.

user_id
string
required
The ID of the user to add to the team.
role_id
string
required
The role ID to assign to the user on this team.
is_team_manager
boolean
Whether the user should be set as a team manager. Defaults to false.

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 PUT "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 '{
    "users": [
      {
        "user_id": "YOUR_USER_ID",
        "is_team_manager": true,
        "role_id": "4"
      }
    ]
  }'
Success Response
{
  "result_ok": true,
  "code": 200,
  "message": "Added 1 users to team.",
  "data": [
    {
      "user_id": "YOUR_USER_ID",
      "result_ok": true,
      "code": 200,
      "message": "Added user to team."
    }
  ]
}
Error Response
{
  "result_ok": false,
  "code": 400,
  "message": "Failed to add all users to team. See data for details.",
  "data": [
    {
      "user_id": "YOUR_USER_ID",
      "result_ok": false,
      "code": 400,
      "message": "Failed to add user to team. User id YOUR_USER_ID not found."
    }
  ]
}