Skip to main content

API Keys

List API Keys

Returns API keys visible to the current workspace, ordered by creation time with the newest key first. The api_key and token_hash fields are never returned by this endpoint; only token_prefix is included.

Create an API Key

Mints a new opaque API key (sk-orq-<key_id>-<secret>) in the workspace. The raw secret is returned ONCE in the response and is never retrievable afterwards. The stored record retains only token_prefix and a SHA-256 token_hash.

List Capabilities

Returns the capability catalog: the set of permission domains that can be granted to an API key. Each entry includes the domain id, display name, group, allowed project scopes, and the read / write verb sets resolved at authorize() time. Drives the permissions UI in the dashboard.

Retrieve an API Key

Retrieves the metadata for an existing API key by its unique identifier. The raw secret is never returned: only token_prefix, permission_mode, project_scope, and lifecycle fields.

Delete an API Key

Permanently deletes an API key. Cache entries in API_KEYS_KV are invalidated immediately so an in-flight token cannot ride out the TTL. The response body is empty on success.

Update an API Key

Updates mutable fields of an API key: display name, status (active / disabled / revoked), permission mode and access map, project scope, and constraints (budget / rate limit / expiry). Omitted fields keep their current values.