What I may do
const url = 'https://example.com/v1/identity/me/permissions';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/identity/me/permissions \ --header 'Authorization: Bearer <token>'What the caller may do, so a client can hide what it can’t: tenant admin, its reviewer role and the roles it decides, its API key’s limits and capabilities, the projects it may read with its role in each and every way it holds it (directly, a team, an org it administers, tenant admin), its orgs and teams, and what each project role allows (from the runtime’s authorization model). The key’s limits are applied: a member key is never tenant admin, and a key limited to a project sees that project alone. Whether the deployment’s license is held back from the caller whatever its role (licenseOperatorOnly), so a console doesn’t ask GET /v1/license. Only what the caller may see. The server still checks every call. 501 permissions-unsupported on a runtime without an authorization store: read whoami’s tenantAdmin and reviewerRole instead.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”What the caller may do.
What the caller may do, with its API key’s limits applied: tenant admin and member, its reviewer role, its key’s limits and capabilities, the projects it may read or run with its role in each and how it holds it, its orgs and teams, what each project role allows, and what everyone in the workspace may do on a project that lets everyone run it. Only what the caller may see: nothing names a project it can neither read nor run, or anyone else’s role.
object
object
Tenant admin, decided as the admin routes decide it (a member key’s never is).
Tenant member: reads the workspace’s settings. Absent when the runtime doesn’t report it.
Present when the caller is a reviewer.
object
Reviewer role class. Hierarchy: standard < senior < admin.
The caller’s reviewer id, its row on the roster: an approval assigned to the caller names it in assignedTo. Absent without a roster row (then canDecide is false), and from a runtime before 0.1.6.
The approvals’ required roles the caller may decide: its own rank and below, lowest first.
Whether the caller can decide at all: deciding also needs its user and its row on the reviewer roster. False for a token that carries a reviewer role without them.
The caller’s API key, when it is one, and what it limits.
object
The most the key may do, under its principal’s grants: an admin key may administer the workspace when its principal is a tenant admin; a member key takes no admin action on the workspace, whoever it’s for; below it, its principal’s roles hold (a project admin’s member key administers that project).
The project the key is limited to: projects holds it alone, and no org or team is administered through it.
Whether the key only reads: then each project’s role shows as viewer, and each org’s and team’s admin as member. Absent from older servers.
The framework capabilities the caller’s token carries (env:write, secrets:write, secrets:rotate, …), which secret, env and signing-key writes require on top of admin at their scope. A sign-in session carries those its person holds: none unless the runtime gives them some, as it does a workspace’s first admin. An API key carries those it was minted with (POST /v1/tokens, none by default).
The projects the caller may read, by name. A key limited to a project lists that one alone.
object
The highest role the caller holds on the project, whichever way.
Every way the caller holds a role on it (for “My access”), and everyone when the project also lets everyone in its workspace run it.
object
A project role, as the authorization model holds it: owner > admin > editor > runner > viewer (a membership stored as member is viewer).
When the membership was added, when the runtime keeps it.
object
The role the team holds on the project.
When the caller joined the team, when the runtime keeps it.
An admin of the org the project sits in: admin on the project.
object
A tenant admin: admin on every project.
object
A person in the project’s workspace, where the project lets everyone run it (everyoneCanRun): what everyoneCapabilities names, and no role. Listed on a project where the caller also holds a role; one it reaches this way alone is in everyoneCanRunProjects instead.
object
The projects the caller holds no role on, and may run because each lets everyone in its workspace run it, by name. A key limited to a project lists that one alone, and a key that only reads, none. Absent when there are none, and from an older server.
A project the caller holds no role on, and may run because it lets everyone in its workspace run it (everyoneCanRun): what everyoneCapabilities names.
object
The orgs the caller is a member or admin of, by name.
object
The teams the caller is a member or admin of, by name.
object
Role on a team membership.
What each project role allows, worked out by the runtime from its authorization model. A client decides an action as capabilities[project.role][type] holding it, or, on a project in everyoneCanRunProjects or whose via lists everyone, everyoneCapabilities[type] holding it; the server still checks every call. An object can grant more on itself (an agent’s own editor), never less, so this is what the caller may do at the least.
object
What a project role allows on the project and on every object of each type in it, by object type.
object
What a project role allows on the project and on every object of each type in it, by object type.
object
What a project role allows on the project and on every object of each type in it, by object type.
object
What a project role allows on the project and on every object of each type in it, by object type.
object
What a project role allows on the project and on every object of each type in it, by object type.
object
What everyone in the workspace may do on a project that lets everyone run it, and on every object of each type in it, by object type: on each project in everyoneCanRunProjects, and on each in projects whose via lists everyone, on top of the role held there. Worked out from the authorization model as capabilities is. Absent from an older server.
object
The line a console shows a caller who may only view a project, as a tenant admin set it in the workspace config (kind: 'config', key console.readOnlyNotice). Plain text on one line, at most 280 characters. Absent when none is set: the console shows its own.
Whether GET /v1/license refuses this caller whatever its role (license-operator-only): the license is the deployment operator’s, held back from this caller. It’s about this caller, not a setting of the deployment. true when the caller isn’t the deployment’s own token and the deployment doesn’t serve the caller’s tenant alone, as on a runtime serving many tenants: a console doesn’t ask. false when it isn’t held back and the caller’s role decides: the deployment’s own token gets false and reads it, and so does an admin of the one tenant the deployment serves (tenant.admin says whether this caller is one); that tenant’s other callers get false too, and are still refused. Absent when the deployment has no license to read, or its tenants couldn’t be read just then: ask GET /v1/license as before.
Example
{ "reviewer": { "role": "standard", "decides": [ "standard" ] }, "key": { "role": "admin" }, "projects": [ { "role": "owner", "via": [ { "kind": "direct", "role": "owner" } ] } ], "orgs": [ { "role": "admin" } ], "teams": [ { "role": "member" } ], "capabilities": { "owner": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] }, "admin": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] }, "editor": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] }, "runner": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] }, "viewer": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] } }, "everyoneCapabilities": { "project": [ "read" ], "agent": [ "read" ], "flow": [ "read" ], "tool": [ "read" ], "guardrail": [ "read" ], "test_set": [ "read" ], "trigger": [ "read" ], "conversation": [ "read" ], "secret": [ "read" ], "env": [ "read" ], "mcp_endpoint": [ "read" ], "run": [ "read" ] }}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" }}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 runtime has no authorization store (permissions-unsupported): read whoami instead.
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 authorization store couldn’t be read (authz-backend-unavailable), or the database was too busy to answer in time (database-busy); either way Retry-After 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.
See also
GET /v1/identity/me/second-factor: My second factorPOST /v1/identity/me/second-factor: Start setting up a second factorPOST /v1/identity/me/second-factor/confirm: Confirm a new second factorPOST /v1/identity/me/second-factor/recovery-codes: New recovery codes- Run with authorization
- People, API keys and service accounts
- Operate a self-hosted runtime
- Error code
authz-backend-unavailable - Error code
database-busy - Error code
permissions-unsupported - Error code
rate-limit-exceeded - Every error code