latestOpenAPI 3.1.02026-08-22154287463.4 KB

858365328f92

API Keys

List API keys

List API keys for the authenticated organization. API keys are masked.

get/org/api_keys

Query parameters

limitinteger

Maximum number of results to return

offsetinteger

Number of results to skip

querystring

Case-insensitive substring match against API key name, creator, and project. API key identifiers and masked keys match by exact value or prefix.

namestring

Exact-match filter on API key name using the database collation. In production, matching is case- and accent-insensitive. Names are not required to be unique, so multiple keys may match. When status=all or include_deleted=true is set, soft-deleted keys with the same name may also match.

sort_by'created_at' | 'name' | 'expires_at'

Field to sort API keys by.

sort_direction'asc' | 'desc'

Sort direction for API keys.

status'active' | 'deleted' | 'all'

Filter API keys by status. "active" returns keys that are not deleted (default; expired-but-not-deleted keys are still included), "deleted" returns only soft-deleted keys, "all" returns both.

include_deletedboolean

Deprecated: use status=all instead. When true, include deleted (soft-deleted) API keys in the results for audit purposes.

Response

List of API keys

created_atstring date-time required

When the API key was created

deleted_atstring date-time nullable required

When the API key was deleted (soft-deleted). Null for keys that have not been deleted.

expires_atstring date-time nullable required

When the API key expires

idstring required

Unique API key identifier

masked_keystring required

Masked version of the API key

namestring required

Label for the API key. API keys are not addressable by name; use the ID or key identifier for stable references.

project_idstring nullable required

Project identifier for project-scoped API keys. Null means org-wide.

project_namestring nullable required

Project name for project-scoped API keys. Null means the key is org-wide or the project name is unavailable.

Example response

[
  {
    "created_by": {
      "email": "user@example.com",
      "id": "user-abc123",
      "name": "Jane Doe"
    },
    "id": "ckv9w8q2f000001l5r3j7k9m4",
    "masked_key": "sk_1234...abcd",
    "name": "production",
    "project_id": "proj_abc123",
    "project_name": "Production"
  }
]