Skip to main content
GET
/
api
/
v1
/
api-keys
List API keys
import requests

url = "https://api.example.com/api/v1/api-keys"

response = requests.get(url)

print(response.text)
{
  "result": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "key_prefix": "<string>",
      "scopes": [
        "<string>"
      ],
      "expires_at": "2023-11-07T05:31:56Z",
      "last_used_at": "2023-11-07T05:31:56Z",
      "is_revoked": true,
      "revoked_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "delegation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "pact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "success": true,
  "suggestion": "",
  "message": "",
  "meta": {
    "total": 123,
    "offset": 123,
    "limit": 123,
    "has_more": true,
    "after": "<string>",
    "before": "<string>"
  }
}

Headers

X-API-Key
string | null
X-Assistant-Service-Key
string | null

Query Parameters

after
string | null

A cursor for forward pagination. Pass the after value from a previous response to retrieve the next page.

before
string | null

A cursor for backward pagination. Pass the before value from a previous response to retrieve the preceding page.

offset
integer | null
deprecated

Deprecated. Use after/before cursors instead.

Required range: 0 <= x <= 9223372036854776000
limit
integer
default:50

The maximum number of items to return. Range: [1, 200].

Required range: 1 <= x <= 200

Response

Successful Response

result
ApiKeyRead · object[]
required
success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

Pagination metadata for list responses.

Supports both legacy offset-based and cursor-based pagination. Cursor fields (has_more, after, before) are populated for cursor-paginated endpoints. Legacy fields (offset, limit) are populated when the caller uses the deprecated offset parameter.