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

# Create API Key

> Generate a new API key. The full key is only returned once.

# Create API Key

Creates a new API key. The full key is only returned once - store it securely.

## Request Body

<ParamField body="name" type="string">Optional name for the key (e.g., "Production")</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.rigbox.dev/api/v1/api-keys \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"name": "Production Bot"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "key": "rb_live_abc123def456..."
  }
  ```
</ResponseExample>

<Warning>
  The full API key (`key` field) is shown only once. Store it in a secure location immediately.
</Warning>
