Replace team members
/api/v1/teams/{team_id}/membersAtomically replace the complete ordered member set. The operation either validates and saves every member or leaves the existing set unchanged; send an empty array to remove every member.
Required access
Credentials: service principal, delegated token, user session
Scope: teams:edit
Uses the same ownership, service-principal allowlist, and teams:edit rules as updating the team itself. Every newly added member agent must also be visible and invocable by the caller; delegated tokens require agents:invoke and cannot add another user's private agent.
An organization-owned automation key, prefixed gsmc_sk_. Already bound to one organization, so it needs no X-Org-Id header. It carries no user identity: it never reaches a private resource however it is scoped, and a run it starts has no user for an interactive tool to reach.
In: header
Path Parameters
uuidHeader Parameters
Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for atomically replacing a team's member set.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/v1/teams/497f6eca-6276-4993-bfeb-53cbbbba6f08/members" \ -H "Authorization: Bearer $GUEST_MACHINES_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "members": [ { "agent_id": "10000000-0000-4000-8000-000000000001", "role": "release reviewer", "position": 0 } ] }'{ "members": [ { "id": 0, "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba", "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "role": "string", "position": 0, "created_at": "2019-08-24T14:15:22Z" } ], "total": 0}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}{ "detail": "string", "error_code": "string", "request_id": "string"}