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.
| Setting | Value |
|---|---|
| Method | PATCH |
| Path | /api/v1/accounts/{account_id}/teams/{team_id}/team_members |
| Authorization | User token. Legacy: administrator. New rules: Teams → update. Not available to agent-bot tokens. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | integer | Yes | Account ID. |
team_id | integer | Yes | Team ID. |
Body parameters (JSON)
| Name | Type | Required | Description |
|---|---|---|---|
user_ids | integer[] | Yes | The 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
- 200
- 401
- 403
- 404
- 422
All the team's members after the change.
The access token is missing or wrong, or its user does not belong to this account.
The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See Authorization.
The resource does not exist in this account.
One of the IDs is not an agent of this account.