Update Users’ Team Properties
Updates role and team manager settings for one or more users already on the specified team.
Endpoint
POST
v5/accountteams/{team_id}/users
Requires authentication
Path Parameters
The team whose user memberships will be updated.
team_id
string
required
The ID of the team on which user properties will be updated.
Body
An array of user-team update objects, one per user to be updated. At least one of is_team_manager or role_id is required per object.
user_id
string
required
The ID of the user to update on this team.
role_id
string
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.
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.
child attributes
user_id
string
The ID of the user processed.
result_ok
boolean
Whether the operation succeeded for this user.
code
integer
Status code for this user.
200 = success, 400 = error.message
string
A message with details about this user's result.
Examples
Request (cURL)
curl -X POST "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": false,
"role_id": "2"
}
]
}'
Success Response
{
"result_ok": true,
"code": 200,
"message": "Updated 1 users on team.",
"data": [
{
"user_id": "YOUR_USER_ID",
"result_ok": true,
"code": 200,
"message": "Updated user on team."
}
]
}
Error Response
{
"result_ok": false,
"code": 400,
"message": "Failed to update all users on team. See data for details.",
"data": [
{
"user_id": "YOUR_USER_ID",
"result_ok": false,
"code": 400,
"message": "Failed to update team for user. User is not a member of team id YOUR_TEAM_ID."
}
]
}