> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbutter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List API Keys

Retrieve a list of all API keys for your organization.

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token from Cognito authentication (JWT).
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The organization ID.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful.
</ResponseField>

<ResponseField name="data" type="array">
  List of API key objects.

  <Expandable title="API Key Object">
    <ResponseField name="key_id" type="string">
      Unique key identifier.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the API key.
    </ResponseField>

    <ResponseField name="role" type="string">
      The role assigned to this key.
    </ResponseField>

    <ResponseField name="prefix" type="string">
      The first 12 characters of the key (for identification).
    </ResponseField>

    <ResponseField name="client_id" type="string">
      The organization ID this key belongs to.
    </ResponseField>

    <ResponseField name="user_id" type="string">
      The user ID who created this key.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status (`active` or `revoked`).
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation.
    </ResponseField>

    <ResponseField name="last_used_at" type="string">
      ISO 8601 timestamp of last usage.
    </ResponseField>

    <ResponseField name="expires_at" type="string">
      ISO 8601 timestamp of expiration.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": [
      {
        "key_id": "apikey_a1b2c3d4e5f6",
        "name": "Production API Key",
        "role": "agent_manager",
        "prefix": "bk_live_xxxx",
        "client_id": "org_abc123",
        "user_id": "user_def456",
        "status": "active",
        "created_at": "2024-01-15T10:30:00Z",
        "last_used_at": "2024-01-15T14:45:00Z",
        "expires_at": "2025-12-31T23:59:59Z"
      }
    ]
  }
  ```
</ResponseExample>
