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

# Create or Update Secret

> Store a secret value in the encrypted vault (write-only)

Creates a secret, or replaces the value if the name already exists (use this
for key rotation — configs referencing `vault:<name>` pick up the new value
automatically).

## Body Parameters

<ParamField body="name" type="string" required>
  Secret name: lowercase letters, digits, `_` or `-`, max 64 characters.
  Example: `pdl_api_key`.
</ParamField>

<ParamField body="value" type="string" required>
  The secret value. Encrypted at rest; never returned by any API.
</ParamField>

## Examples

```bash cURL theme={null}
curl --request POST \
  --url "https://api.kardow.com/secrets" \
  --header "x-api-key: your-api-key-here" \
  --header "Content-Type: application/json" \
  --data '{ "name": "pdl_api_key", "value": "sk_live_..." }'
```

## Response

```json theme={null}
{
  "data": {
    "name": "pdl_api_key",
    "reference": "vault:pdl_api_key"
  }
}
```

Use the returned `reference` wherever feature config accepts a secret — for
example an enrichment provider header:

```json theme={null}
{ "headers": { "X-Api-Key": "vault:pdl_api_key" } }
```
