Skip to content

Which system key this is

View as Markdown
GET
/v1/system/whoami
curl --request GET \
--url https://example.com/v1/system/whoami \
--header 'Authorization: Bearer <token>'

A system key’s own id, scopes and expiry, for a service checking its key: any system principal, on a runtime serving many tenants. A tenant’s key or session is refused (system-principal-required). GET /v1/identity/whoami is a tenant route, which refuses a system key. A runtime serving one tenant answers no one here: its own token is that tenant’s outside /v1/system/keys, and a system key reads the license routes alone.

The key.

Media typeapplication/json
object
keyId
required

The system key’s id, or boot for the deployment’s own token.

string
scopes
required
Array<string>
expiresAt
string format: date-time
Examplegenerated
{
"keyId": "example",
"scopes": [
"example"
],
"expiresAt": "2026-04-15T12:00:00Z"
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

A tenant’s key or session (system-principal-required). On a runtime serving one tenant, the deployment’s own token too (system-principal-required), a system key (system-scope-missing), and one holding anything but system:license (system-key-scope-not-served).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

See also