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

# List API Keys

> Retrieve all API keys for your organization

## Endpoint

```
POST https://api.ugc.inc/org/api-key
```

## Overview

Retrieve a list of all API keys associated with your organization. This endpoint returns metadata about each API key including the ID, name, and creation date. For security reasons, the actual key values are not returned.

## Request Body

No request body parameters required.

## Response

<ResponseField name="data" type="ApiKey[]">
  Array of API key objects

  <Expandable title="ApiKey properties">
    <ResponseField name="id" type="string">
      Unique API key identifier
    </ResponseField>

    <ResponseField name="name" type="string">
      Human-readable name for the API key
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the key was created
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  The actual API key values are not included in the response for security reasons. Key values are only shown when initially created.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.ugc.inc/org/api-key \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json"
  ```

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

  response = requests.post(
      'https://api.ugc.inc/org/api-key',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      }
  )

  data = response.json()

  if data['ok']:
      print('API Keys:', data['data'])
      for key in data['data']:
          print(f"  - {key['name']} (created: {key['created_at']})")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.ugc.inc/org/api-key', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();

  if (data.ok) {
    console.log('API Keys:', data.data);
    data.data.forEach(key => {
      console.log(`${key.name} (ID: ${key.id})`);
    });
  }
  ```

  ```typescript React theme={null}
  import { UGCClient } from 'ugcinc';

  const client = new UGCClient({
    apiKey: 'YOUR_API_KEY'
  });

  const response = await client.org.getApiKeys();

  if (response.ok) {
    console.log('API Keys:', response.data);
    response.data.forEach(key => {
      console.log(`${key.name} - Created: ${key.created_at}`);
    });
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Success",
    "data": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Production API Key",
        "created_at": "2024-01-15T10:30:00.000Z"
      },
      {
        "id": "660e8400-e29b-41d4-a716-446655440001",
        "name": "Development API Key",
        "created_at": "2024-02-20T14:45:00.000Z"
      }
    ]
  }
  ```
</ResponseExample>
