# Config

List, set and delete variables and secrets with the REST API.

## List

```http
GET /api/projects/:id/config
```

Returns each variable and secret with its name, kind and description. Variable values are included; secret values never are.

## Set

```http
PUT /api/projects/:id/config/:name
```

| Field | Type | Description |
| --- | --- | --- |
| `kind` | `"variable"` \| `"secret"` | — |
| `value` | string | Up to 4,096 characters |
| `description` | string? | Up to 300 characters |

```bash
curl -X PUT https://wispfn.com/api/projects/$PROJECT/config/STRIPE_SECRET_KEY \
  -H "Authorization: Bearer $WISP_API_KEY" -H "content-type: application/json" \
  -d '{"kind": "secret", "value": "sk_live_..."}'
```

Applies to the draft and live version at once. Scope: `config:write`.

## Delete

```http
DELETE /api/projects/:id/config/:name
```
