Provision a tenant with its system accounts (platform staff only)
Provisions a partner loop: the tenant's ledger is created first, then the tenant row, so the tenant id is minted alongside its books.
/v1/tenantsProvisions a partner loop: the tenant's ledger is created first, then the tenant row, so the tenant id is minted alongside its books. Requires a platform staff token holding platform:manage; every other principal is refused platform_scope_only (403). A missing body, a blank name or a currency the service rejects give invalid_request (400). The change is audited.
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/tenants" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "currency": "string" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "currency": "string", "status": "string", "fees": { "payment": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 }, "subscription": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 }, "commission": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 }, "p2p": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 }, "topup": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 }, "payout": { "bps": 0, "flat": 0, "min_fee": 0, "max_fee": 0 } }, "commission_mode": "deduct", "created_at": "2019-08-24T14:15:22Z"}List tenants (platform staff only)
Every tenant on this deployment, newest first, with its fee plan and commission mode.
Per-tenant health snapshot — balances, fee plan, ledger invariants (platform staff only)
The tenant's balance rollup by owner type, purpose and commodity, plus the one invariant a caller can check without holding the books: every commodity must net to zero across the whole ledger.