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

# Create API Key — estudjo API Reference

> Create a new estudjo API key. The full key is returned only once at creation — store it immediately. Requires an existing X-Api-Key header.

Create a new API key for your estudjo account. You might use additional keys to isolate different integrations, rotate credentials, or grant scoped access to separate services. The full key value is returned **only once** in the creation response — store it immediately in a secure location.

## Request

|            |                                       |
| ---------- | ------------------------------------- |
| **Method** | `POST`                                |
| **URL**    | `https://v1.api.estudjo.com/api-keys` |
| **Auth**   | `X-Api-Key` header                    |

### Body

<ParamField body="name" type="string" required>
  Human-readable label for the key. Use something descriptive that identifies where or how the key will be used (e.g. `"Zapier integration"`).
</ParamField>

```bash theme={null}
curl -X POST https://v1.api.estudjo.com/api-keys \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Zapier integration"}'
```

## Response

### 200 — Created

```json theme={null}
{
  "success": true,
  "data": {
    "id": 4,
    "name": "Zapier integration",
    "api_key": "9e6e81a6d...",
    "message": "save this key now — it will not be shown again"
  }
}
```

<Warning>
  The `api_key` value is shown **only once** in this response and cannot be retrieved again. Copy it to a secure secrets store (e.g. an environment variable, a password manager, or a secrets manager) before closing this request.
</Warning>

<ResponseField name="success" type="boolean">
  `true` when the key was created successfully.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="id" type="number">
      Unique numeric identifier for the API key. Use this value when revoking the key via `DELETE /api-keys/{id}`.
    </ResponseField>

    <ResponseField name="name" type="string">
      The human-readable label you provided in the request body.
    </ResponseField>

    <ResponseField name="api_key" type="string">
      The full API key value. **Shown only once** — it cannot be retrieved after this response. Store it securely immediately.
    </ResponseField>

    <ResponseField name="message" type="string">
      A plain-language reminder that the key will not be shown again.
    </ResponseField>
  </Expandable>
</ResponseField>
