v171

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0726249111.7 MB
API keys

List API keys

Returns API keys visible to the current workspace as a JSON array. Raw tokens are never included; the token field contains a masked display value.

get/v2/api-keys

Query parameters

limitinteger

Page size, 1–200. Unset uses the server default (25).

starting_afterstring

Cursor for forward pagination. Set to the api_key_id of the last item from the previous page.

ending_beforestring

Cursor for backward pagination. Set to the api_key_id of the first item from the previous page.

project_idstring

Optional filter: only return keys belonging to this project. When omitted, returns workspace-scoped and any single-project keys.

status'API_KEY_STATUS_UNSPECIFIED' | 'API_KEY_STATUS_ACTIVE' | 'API_KEY_STATUS_DISABLED' | 'API_KEY_STATUS_REVOKED'

Optional filter: only return keys with this status.

searchstring

Optional case-insensitive substring match against the api-key name. Empty means no name filter.

owner_typeOwnerType[]

Optional filter: only return keys whose owner.kind matches one of the requested types. Combines the user / service-account oneof cases into a single repeated enum so the wire stays flat and multi-select filters travel as a single field. Empty means no owner-type filter.

permission_modePermissionMode[]

Optional filter: only return keys whose permission mode is one of the listed presets. Empty means no permission-mode filter.

include_budgetboolean

When true, embed each key's api-key-scoped budget (config and limits only, no live usage) on the returned records. Adds one budget lookup for the page; omit to skip it.

Response

API keys in the workspace.

idstring required
namestring required
workspace_idstring required
tokenstring required

Raw on create/retrieve and masked in list responses.

activeboolean
is_legacyboolean
sourcestring
budgetobject
expirationstring date-time
projectsstring[]
created_by_idstring nullable
updated_by_idstring nullable
createdstring date-time
updatedstring date-time
consumptionnumber
token_consumptionnumber
requests_per_minute_consumptionnumber
ownerobject
project_scopeobject
permission_modestring
accessobject
token_prefixstring
statusstring
constraintsobject
mcp_accessobject
legacy_token_familystring
legacy_key_idstring
last_used_atstring date-time