Teams

Group members so keys and usage follow a function, not a person.

A team is a named subset of the organization. Issuing a key to a team rather than an individual means the key survives people joining and leaving, and usage rolls up to the team in reporting.

Managing teams

MethodPathPurpose
GET/api/organization/{id}/teamsList teams
POST/api/organization/{id}/teamsCreate a team
PUT/api/organization/{id}/teams/{team_id}Rename a team
DELETE/api/organization/{id}/teams/{team_id}Delete a team

Team membership

MethodPathPurpose
GET/api/organization/{id}/teams/{team_id}/membersList who is on the team
POST/api/organization/{id}/teams/{team_id}/membersAdd someone
DELETE/api/organization/{id}/teams/{team_id}/members/{user_id}Remove someone
curl
curl https://your-instance.com/api/organization/$ORG_ID/teams \
  -H "Authorization: Bearer $CLAWROUTER_ACCESS_TOKEN" \
  -H "New-Api-User: $USER_ID" \
  -H "Content-Type: application/json" \
  -d '{"name": "Platform"}'

Someone must already be a member of the organization before they can be added to one of its teams. Teams organise the roster; they do not grant entry to it.