Overview

Fund one wallet, issue keys from it, and see who spent what.

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

ConceptWhat it is
OrganizationThe billing entity. Owns a wallet and the keys drawn against it.
WalletThe organization's balance. Funded from an owner's personal balance.
MemberA user who belongs to the organization. Role is either member or owner.
BudgetQuota allocated from the wallet to one member. Reclaimable while unspent.
TeamA named group of members. Keys can be issued to a team rather than a person.
Organization keyAn sk- key billed to the wallet, optionally assigned to a member or team.

Roles

RoleValueCan do
Member1Read the organization, its member list, their own keys and their own usage
Owner100Everything: 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.

Headers
Authorization: Bearer <your access token>
New-Api-User: <your user id>

List your organizations

GEThttps://your-instance.com/api/organization/
curl
curl https://your-instance.com/api/organization/ \
  -H "Authorization: Bearer $CLAWROUTER_ACCESS_TOKEN" \
  -H "New-Api-User: $USER_ID"

Create one

POSThttps://your-instance.com/api/organization/

Whoever creates the organization becomes its first owner. The wallet starts empty; fund it before issuing keys.

curl
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

MethodPathRole
GET/api/organization/{id}/Member
PUT/api/organization/{id}/Owner
DELETE/api/organization/{id}/Owner