An organization lets a group share funding without sharing a credit card. The owner tops the wallet up once, issues keys against it, and allocates budgets to members. Usage is charged to the organization rather than to anyone's personal balance, and unspent budget can be pulled back.
Nothing about the model API changes. An organization key is an ordinary sk- key — same endpoints, same request bodies. Only the account that gets billed is different.
The pieces
| Concept | What it is |
|---|---|
Organization | The billing entity. Owns a wallet and the keys drawn against it. |
Wallet | The organization's balance. Funded from an owner's personal balance. |
Member | A user who belongs to the organization. Role is either member or owner. |
Budget | Quota allocated from the wallet to one member. Reclaimable while unspent. |
Team | A named group of members. Keys can be issued to a team rather than a person. |
Organization key | An sk- key billed to the wallet, optionally assigned to a member or team. |
Roles
| Role | Value | Can do |
|---|---|---|
Member | 1 | Read the organization, its member list, their own keys and their own usage |
Owner | 100 | Everything: money, membership, invitations, keys, teams, and org-wide usage |
Authenticating
These routes take your account's access token, not an sk- key, and access-token callers must also send New-Api-User carrying their own user id. The header is a cross-check that the caller knows which user it is acting as; without it the request is refused.
Authorization: Bearer <your access token> New-Api-User: <your user id>
List your organizations
https://your-instance.com/api/organization/curl https://your-instance.com/api/organization/ \ -H "Authorization: Bearer $CLAWROUTER_ACCESS_TOKEN" \ -H "New-Api-User: $USER_ID"
Create one
https://your-instance.com/api/organization/Whoever creates the organization becomes its first owner. The wallet starts empty; fund it before issuing keys.
curl https://your-instance.com/api/organization/ \
-H "Authorization: Bearer $CLAWROUTER_ACCESS_TOKEN" \
-H "New-Api-User: $USER_ID" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Inc."}'Read, rename, delete
| Method | Path | Role |
|---|---|---|
GET | /api/organization/{id}/ | Member |
PUT | /api/organization/{id}/ | Owner |
DELETE | /api/organization/{id}/ | Owner |
