Skip to main content

Replace Team Members

PATCH 

/accounts/:account_id/teams/:team_id/team_members

Sets the team's member list to exactly the agents you send.

The list becomes exactly user_ids: missing agents are added, and members not in the list are removed. Returns the full member list after the change.

SettingValue
MethodPATCH
Path/api/v1/accounts/{account_id}/teams/{team_id}/team_members
AuthorizationUser token. Legacy: administrator. New rules: Teams → update. Not available to agent-bot tokens.

Path parameters

NameTypeRequiredDescription
account_idintegerYesAccount ID.
team_idintegerYesTeam ID.

Body parameters (JSON)

NameTypeRequiredDescription
user_idsinteger[]YesThe complete list of member IDs.

Example request: the team had members 51 and 53; after this call it has 51 and 52.

curl -X PATCH 'https://online.99digital.co.il/api/v1/accounts/12/teams/7/team_members' \
-H 'api_access_token: <YOUR_API_ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "user_ids": [51, 52] }'

Example response (200 OK): an array of agent objects for all current members (here the agents with "id": 51 and "id": 52).

Error responses: 422 {"error": "Invalid User IDs"}.

Request​

Responses​

All the team's members after the change.