---
title: "GET /api-keys"
method: GET
path: "/api-keys"
---

# GET /api-keys

`GET /api-keys`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/api-keys`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Query parameters

- `cursor` string: Opaque cursor from a previous response to fetch the next page
- `limit` integer: Maximum number of items to return per page (1–100, default 20)
- `mode` 'LIVE' | 'TEST': Filter keys by environment mode
- `agentId` string: Filter keys restricted to a specific agent
- `includeRevoked` boolean: Whether to include revoked keys in results

## Response `200`

OK

- object: Paginated list of API keys
  - `items` object[], required: Array of API key resources in the current page
    - `id` string, required: Unique identifier for the API key
    - `orgId` string, required: Organization that owns this API key
    - `agentId` string, nullable, required: Agent this key is restricted to, null if unrestricted
    - `name` string, nullable, required: Human-readable label for the API key
    - `prefix` string, required: Non-secret prefix of the key for identification
    - `mode` 'LIVE' | 'TEST', required: Environment mode of the key
    - `scopes` string[], required: Permission scopes granted to this key
    - `revoked` boolean, required: Whether the key has been revoked
    - `createdAt` string, date-time, required: ISO 8601 timestamp when the key was created
    - `lastUsedAt` string, date-time, nullable, required: ISO 8601 timestamp when the key was last used, null if never used
    - `expiresAt` string, date-time, nullable, required: ISO 8601 timestamp when the key expires, null if no expiration
    - `createdBy` string, nullable, required: User ID of the key creator, null if created by system
    - `extension` object, nullable: Extension-token settings surfaced from metadata. Present only for extension:bridge keys.
      - `authPolicy` 'session' | 'pre_approved' | 'prompt_owner', required
      - `tokenTtl` '15m' | '1h' | 'session', required
  - `pagination` object, required: Cursor-based pagination metadata
    - `nextCursor` string, nullable, required: Cursor to pass as the `cursor` parameter to retrieve the next page, or null if no more results
    - `hasMore` boolean, required: Whether additional pages of results are available

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
