Fetch the caller's tenant
const url = 'https://example.com/v1/tenant';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/tenant \ --header 'Authorization: Bearer <token>'Returns the tenant the bearer token authenticates as. There is no /v1/tenants collection — tenants are the sovereignty boundary, not a listable resource under a tenant. A runtime that gates production adds productionAllowed (and productionNext while it’s false), and one that sets limits adds the tenant’s limits.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Tenant.
object
Whether the tenant may put projects in production. Absent from a runtime that doesn’t gate production.
Where to go to be allowed to put projects in production, for example a billing page. Only while productionAllowed is false, and only when the runtime names one.
On a runtime serving many tenants: closing (readable and exportable for its window, nothing changes) or suspended (the same, until restored). closing wins. Absent: active.
The tenant’s limits that are set. A limit that isn’t set is absent, and isn’t enforced.
object
API requests a minute. Past it: 429 rate-limit-exceeded.
Webhook deliveries received a minute, across the tenant’s triggers. Past it: 429.
Runs executing at once. Past it, a new run waits as pending.
Runs waiting as pending. Past it, a new run is refused with 429.
Tool calls in flight to the tenant’s pack services. Past it, a call waits for a slot.
Approvals waiting for a decision. Past it, the step that asks fails, naming the limit.
Projects in production at once. Past it, putting another project in production is refused with 403 production-limit-reached. Lowering it takes no project out of production.
Example
{ "state": "active"}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The tenant id on the token does not resolve to a stored row.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}