Skip to main content
GET
/
v2
/
api-keys
Core - List active project keys
curl --get 'https://api.orq.ai/v2/api-keys' \
  --header 'Authorization: Bearer $ORQ_API_KEY' \
  --data-urlencode 'limit=25' \
  --data-urlencode 'project_id=proj_01HZXW2K7Y8Q9M0N1P2R3S4T5V' \
  --data-urlencode 'status=API_KEY_STATUS_ACTIVE'
{
  "object": "<string>",
  "data": [
    {
      "api_key_id": "<string>",
      "name": "<string>",
      "owner": {
        "user": {
          "user_id": "<string>"
        },
        "service_account": {}
      },
      "project_scope": {
        "all": {},
        "single": {
          "project_id": "<string>"
        }
      },
      "token_prefix": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "access": {},
      "created_by_id": "<string>",
      "updated_by_id": "<string>",
      "last_used_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "legacy_key_id": "<string>"
    }
  ],
  "has_more": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer<int32>

Page size, 1–200. Unset uses the server default (25).

starting_after
string

Cursor for forward pagination. Set to the api_key_id of the last item from the previous page.

ending_before
string

Cursor for backward pagination. Set to the api_key_id of the first item from the previous page.

project_id
string

Optional filter: only return keys belonging to this project. When omitted, returns workspace-scoped and any single-project keys.

status
enum<string>

Optional filter: only return keys with this status.

Available options:
API_KEY_STATUS_UNSPECIFIED,
API_KEY_STATUS_ACTIVE,
API_KEY_STATUS_DISABLED,
API_KEY_STATUS_REVOKED

Optional case-insensitive substring match against the api-key name. Empty means no name filter.

owner_type
enum<string>[]

Optional filter: only return keys whose owner.kind matches one of the requested types. Combines the user / service-account oneof cases into a single repeated enum so the wire stays flat and multi-select filters travel as a single field. Empty means no owner-type filter.

Available options:
OWNER_TYPE_UNSPECIFIED,
OWNER_TYPE_USER,
OWNER_TYPE_SERVICE_ACCOUNT
permission_mode
enum<string>[]

Optional filter: only return keys whose permission mode is one of the listed presets. Empty means no permission-mode filter.

Available options:
PERMISSION_MODE_UNSPECIFIED,
PERMISSION_MODE_ALL,
PERMISSION_MODE_RESTRICTED,
PERMISSION_MODE_READ_ONLY

Response

200 - application/json

OK

object
string
required

Object discriminator for list responses; always list.

data
object[]
required

Page of api-keys, ordered newest first. token_hash and api_key are always elided in list responses.

has_more
boolean
required

Whether more api-keys are available in the selected pagination direction.