List the caller's API keys, or the keys bound to one project, newest first; every surface returns active keys unless status selects expired, revoked or all.
Arguments
inputApiKeysInputinput.projectReferenceStringProject ID or slug. Listing the keys bound to a project requires project.api_keys.read. Omit to list the caller's own keys; a project-scoped API-key caller retains its enforced project when this field is omitted.
input.limitIntinput.cursorStringinput.statusStringWhich keys to list: active (the default), expired, revoked or all.
input.sortByApiKeySortByField to sort by. Ties break by key ID ascending. Default
created_at. One ofcreated_at,name,last_used_at.input.sortOrderApiKeySortOrderSort direction. Default
desc. One ofasc,desc.
Responses
query ApiKeys { apiKeys { data { id projectId userId accountId name keyPrefix lastUsedAt expiresAt createdAt updatedAt status revokedAt scopes scope } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } totalCount }}{ "data": { "apiKeys": { "data": [ { "id": "string", "projectId": "string", "userId": "string", "accountId": "string", "name": "string", "keyPrefix": "string", "lastUsedAt": "string", "expiresAt": "string", "createdAt": "string", "updatedAt": "string", "status": "string", "revokedAt": "string", "scopes": [ "string" ], "scope": "string" } ], "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "startCursor": "string", "endCursor": "string" }, "totalCount": 0 } }}The ApiKeysPayload! in data.apiKeys.