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

# Create API Key

> Creates a new API key for an environment.

<Warning>
  The raw key is returned **once** in the `201` response. Store it securely — it cannot be retrieved
  again. Feather Flag stores only a SHA-256 hash.
</Warning>

## Path parameters

<ParamField path="projectId" type="string" required />

<ParamField path="envId" type="string" required />

## Body

<ParamField body="type" type="&#x22;server&#x22; | &#x22;client&#x22;" required>
  `server` keys can evaluate any flag. `client` keys are restricted to flags with `clientSafe:
      true`.
</ParamField>

<ParamField body="description" type="string" required>
  Human-readable label, e.g. `"CI pipeline"` or `"React app"`.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../environments/env_01hx.../api-keys \
    -H "Authorization: Bearer <server_key>" \
    -H "Content-Type: application/json" \
    -d '{ "type": "server", "description": "Backend service" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "key_01hx...",
    "key": "sk_ab12cd34ef56gh78ij90kl12mn34op56",
    "keyPrefix": "sk_ab12",
    "type": "server"
  }
  ```
</ResponseExample>
