apiKeys

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

  • inputApiKeysInput

  • input.projectReferenceString

    Project 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.limitInt

  • input.cursorString

  • input.statusString

    Which keys to list: active (the default), expired, revoked or all.

  • input.sortByApiKeySortBy

    Field to sort by. Ties break by key ID ascending. Default created_at. One of created_at, name, last_used_at.

  • input.sortOrderApiKeySortOrder

    Sort direction. Default desc. One of asc, 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.