Update User’s Team Properties
Updates role and team manager settings for teams where the user is already a member.
Endpoint
POST
v5/accountuser/{user_id}/teams
Requires authentication
Path Parameters
The user whose team memberships will be updated.
user_id
string
required
The user ID of the subject user.
Body
The request body is an array of team-property update objects.
team_id
string
required
The team ID to update for this user.
is_team_manager
boolean
Whether the user should be set as the team manager.
role_id
string
Role ID to assign for this user on the team.
Response
Returns overall status and per-team update results.
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
Per-team update results.
child attributes
team_id
string
The ID of the team that was updated for this user.
result_ok
boolean
Whether the operation succeeded for this team.
code
integer
Status code for this team.
200 = success, 400 = error.message
string
A message with details about this team's result.
Examples
Request (cURL)
curl -X POST "https://api.alchemer.com/v5/accountuser/1/teams?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET" \
-H "Content-Type: application/json" \
-d '{
"teams": [
{
"team_id": "12345",
"is_team_manager": true,
"role_id": "3"
}
]
}'
Success Response
{
"result_ok": true,
"code": 200,
"message": "Updated user on 1 teams.",
"data": [
{
"team_id": "12345",
"result_ok": true,
"code": 200,
"message": "Updated user on team."
}
]
}
Error Response
{
"result_ok": false,
"code": 400,
"message": "Failed to update all teams for user. See data for details.",
"data": [
{
"team_id": "12345",
"result_ok": false,
"code": 400,
"message": "Failed to update team for user. User is not a member of team id 12345."
}
]
}