List API keys

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

GET/org/api_keys

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

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Maximum number of results to return

Rangevalue <= 100
Default20
offset?integer

Number of results to skip

Default0
query?string

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

name?string

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?string

Field to sort API keys by.

Default"created_at"

Value in

  • "created_at"
  • "name"
  • "expires_at"
sort_direction?string

Sort direction for API keys.

Default"desc"

Value in

  • "asc"
  • "desc"
status?string

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.

Default"active"

Value in

  • "active"
  • "deleted"
  • "all"
include_deleted?boolean
Deprecated

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

Defaultfalse

Response

application/json

List of API keys

[index: integer]?
curl -X GET "https://example.com/org/api_keys"
[  {    "id": "string",    "name": "string",    "created_at": "2019-08-24T14:15:22Z",    "created_by": {      "id": "string",      "email": "user@example.com",      "name": "string"    },    "expires_at": "2019-08-24T14:15:22Z",    "deleted_at": "2019-08-24T14:15:22Z",    "project_id": "string",    "project_name": "string",    "masked_key": "string"  }]