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

# playground headers add

> Add a header to the playground configuration

Adds a custom HTTP header definition to the Alpic playground for an environment. Headers can be marked as required or secret to control how users provide them when accessing the playground.

## Usage

```bash theme={null}
alpic playground headers add
```

Prompts for header details interactively.

## Extended Usage

**Add a required secret header non-interactively:**

```bash theme={null}
alpic playground headers add --name "X-Api-Key" --description "API key for authentication" --required --secret
```

**Add an optional, visible header:**

```bash theme={null}
alpic playground headers add --name "X-Tenant-Id" --description "Tenant identifier" --no-required --no-secret
```

**Add a header to a specific environment:**

```bash theme={null}
alpic playground headers add --environment-id <environmentId> --name "X-Api-Key" --description "API key for authentication" --required --secret
```

## Options

| Flag                | Description                                                              |
| ------------------- | ------------------------------------------------------------------------ |
| `--environment-id`  | The ID of the environment (optional — read from local config if omitted) |
| `--name`            | The header name (max 100 characters)                                     |
| `--description`     | The header description (max 200 characters)                              |
| `--required`        | Whether the header is required. Use `--no-required` to make it optional  |
| `--secret`          | Whether the header value is secret. Use `--no-secret` to keep it visible |
| `--non-interactive` | Disable interactive prompts. Requires `--name` and `--description`.      |

<Tip>
  When running from a directory linked to an Alpic project, `--environment-id` is optional — the CLI reads it from the
  local `.alpic` config file.
</Tip>
