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

# List API Keys

## List API Keys

Retrieve a list of API keys belonging to the authenticated user.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.example.com/api/v1/api_keys" \
    -H "X-API-Key: your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.example.com/api/v1/api_keys', {
    method: 'GET',
    headers: {
      'X-API-Key': 'your-api-key-here'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'X-API-Key': 'your-api-key-here'
  }

  response = requests.get(
      'https://api.example.com/api/v1/api_keys',
      headers=headers
  )

  data = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="status" type="object">
  Response status information

  <ResponseField name="code" type="integer">
    HTTP status code (200)
  </ResponseField>

  <ResponseField name="message" type="string">
    Status message
  </ResponseField>
</ResponseField>

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

  <ResponseField name="id" type="integer">
    API key ID
  </ResponseField>

  <ResponseField name="key_type" type="string">
    Type of key: 'private' or 'public'
  </ResponseField>

  <ResponseField name="name" type="string">
    Descriptive name for the key
  </ResponseField>

  <ResponseField name="key_value" type="string">
    The actual key (only returned on creation)
  </ResponseField>

  <ResponseField name="allowed_origins" type="array">
    Array of allowed CORS origins
  </ResponseField>

  <ResponseField name="allowed_assistants" type="array">
    Array of assistant IDs the key can access
  </ResponseField>

  <ResponseField name="transient_assistant" type="boolean">
    Whether the key supports transient assistants
  </ResponseField>

  <ResponseField name="user_id" type="integer">
    Owner user ID
  </ResponseField>

  <ResponseField name="user_email" type="string">
    Owner email address
  </ResponseField>

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

  <ResponseField name="updated_at" type="string">
    ISO 8601 last update timestamp
  </ResponseField>
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": {
      "code": 200,
      "message": "Success"
    },
    "data": [
      {
        "id": 1,
        "key_type": "private",
        "name": "Production API Key",
        "key_value": null,
        "allowed_origins": ["https://example.com"],
        "allowed_assistants": ["123", "456"],
        "transient_assistant": false,
        "user_id": 1,
        "user_email": "user@example.com",
        "created_at": "2024-01-10T08:00:00Z",
        "updated_at": "2024-01-10T08:00:00Z"
      }
    ]
  }
  ```
</ResponseExample>

<Warning>
  The `key_value` field is only returned when creating a new API key. It cannot be retrieved later for security reasons.
</Warning>

## Error Responses

<ResponseField name="401" type="object">
  Unauthorized - Invalid or missing authentication
</ResponseField>
