Workspaces

A workspace is the unit of tenancy: one per business. Every workspace runs in sandbox today.

POST /api/workspaces

Needs either a signed-in dashboard session, or an apk_ key with write:api_keys. Anonymous calls get 401.

Body:

{
"name": "Acme Inc",
"plan": "alpha"          // "alpha" (free) | "growth"
}

Creates the workspace, a placeholder for its US dollar account (the real account at our partner bank opens when business verification is submitted), its account with the card issuing partner (a test stand-in when the partner isn't connected), and a first apk_ key with only read:api_keys and write:api_keys. Use that key to create keys with the scopes your integration needs. The key's secret is returned once.

GET /api/workspaces

Bearer apk_

Returns the workspace the key belongs to.

API keys

POST /api/auth/keys

Bearer apk_ · write:api_keys

{
"label": "production-agent-runner",
"scopes": ["read:treasury", "read:cards", "write:agents"]
}

A key can only create keys with scopes it holds itself. * and unknown scopes are refused. The secret is shown once.

GET /api/auth/keys

Bearer apk_ · read:api_keys

Lists the workspace's keys (prefix only, never the secret).

DELETE /api/auth/keys?id=<id>

Bearer apk_ · write:api_keys

Revokes a key, and every key it created. Can't be undone.