Fetch the caller's workspace
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 workspace the bearer token authenticates as. There is no /v1/tenants collection — workspaces are the sovereignty boundary, not a listable resource under a workspace. A runtime that gates production adds productionAllowed (and productionNext while it’s false), one that sets limits adds the workspace’s limits, one that counts files adds storage (what they take, to compare with limits.storageMiB), and a deployment that publishes where its calls come from adds egress.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Workspace.
object
Whether the workspace 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 workspace’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 workspace’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 workspace’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.
MiB of files the workspace may keep: its uploads, its runs’ files and its tools’ files, with the uploads under way. Past it, an upload is refused with 403 storage-limit-reached, and a tool’s file isn’t stored. Lowering it deletes no file.
Flows in production, each counted once however many of the workspace’s projects in production run it. There’s a margin: a write that would take the count past the most, the larger of 1.2 times this (rounded down) and one more than it, is refused with 403 plan-limit-reached (scope: tenant), and a write’s answer warns from this number on (planWarning). Lowering it takes nothing out of production.
Agents in production, counted as flowsInProduction is, with the same margin and the same refusal.
What the workspace’s files take now. Only from a runtime that counts them. Compare it with limits.storageMiB, in MiB of 1,048,576 bytes.
object
The bytes its uploads, its runs’ files and its tools’ files take, with the uploads under way. It can be over a limit lowered below it.
The IP addresses this deployment’s calls to other sites come from, for a site that admits only known addresses. They’re the same for every workspace on the deployment, so admitting them admits every workspace’s calls: a site still checks its own credentials. They say where calls come from, not where they go. Absent when the deployment publishes none. An empty list: none of that kind.
object
Where the server’s own calls come from, such as its calls to MCP servers and model providers, and its webhook deliveries.
Where calls made by the code deployed to it come from.
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 workspace 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" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.
The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
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" }}Headers
Section titled “Headers”Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.