List the org's API keys

GET/o/{org}/api-keys
View .md

The caller's live keys in the org, without their secrets, with the runs each started in the last seven days (stats), and the MCP clients they connected through OAuth (kind oauth) whose refresh token has not lapsed. Any member, signed in; an API key cannot call this.

Authenticate with a signed-in session token (an API key cannot call this route).

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

Responses

200The keys.
dataarray of ApiKeyrequired
14 item fields
idstringrequired

key_…; use it in the key routes.

kindstringoptional

key is minted here; oauth is an MCP client a person connected by signing in. An oauth grant reaches only the MCP server, cannot be rotated and has no webhook; its expires_at is when it ends unless the client refreshes it.

One ofkeyoauth
namestringrequired
prefixstringrequired

The secret's first characters, to tell keys apart.

scopesarray of stringrequired
max_concurrentintegerrequired
webhook_urlstring | nullrequired
expires_atstring | nullrequired
Format date-time
created_byobjectrequired
2 fields
idstringrequired
emailstring | nullrequired
last_used_atstring | nullrequired
Format date-time
created_atstringrequired
Format date-time
statsobjectoptional

The runs the key started in the last seven days. Only in the list. finished counts runs that ended completed or needs_review, out of ended. webhook_deliveries is the state of each run's latest completion webhook: delivered, still being retried, or dropped after the last try.

7 fields
sincestringrequired
Format date-time
runsintegerrequired
finishedintegerrequired
endedintegerrequired
spend_usdnumberrequired
mcp_runsintegerrequired

Of runs, those started through MCP.

webhook_deliveriesobjectrequired
3 fields
deliveredintegerrequired
retryingintegerrequired
failedintegerrequired
secretstringoptional

The key's secret. Only in the create and rotate responses; never shown again.

webhook_secretstringoptional

The webhook signing secret. Only in the update response that minted it.

401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404No such resource for the caller, including one in an org the caller is not in or a Project that is private to someone else.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
429The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED).

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED). The error names the limit. Wait Retry-After seconds.

errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional