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
| Method | Path | Purpose |
|---|---|---|
GET | /api/organization/{id}/teams | List teams |
POST | /api/organization/{id}/teams | Create a team |
PUT | /api/organization/{id}/teams/{team_id} | Rename a team |
DELETE | /api/organization/{id}/teams/{team_id} | Delete a team |
Team membership
| Method | Path | Purpose |
|---|---|---|
GET | /api/organization/{id}/teams/{team_id}/members | List who is on the team |
POST | /api/organization/{id}/teams/{team_id}/members | Add 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.
