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

# Create an API key

> Create a server-side API key and use it with WADial requests.

Create an API key when your server needs to call WADial. Keep the key on your server and never expose it in frontend code.

## Create the key

1. Open the WADial dashboard
2. Click **API Keys**
3. Click **Create key**
4. Enter a name, such as `production-orders`
5. Copy the secret before closing the dialog

WADial shows the secret once. If you lose it, revoke the key and create a new one.

## Store the key

Store the secret in your server’s environment variables:

```env theme={null}
WADIAL_API_KEY=wd_...
WADIAL_BASE_URL=https://api.wadial.com
```

Use separate keys for production, staging, and local development.

## Send an authenticated request

Include the key as a bearer token:

```bash theme={null}
curl "https://api.wadial.com/api/v1/sessions" \
  -H "Authorization: Bearer $WADIAL_API_KEY"
```

If a key is no longer used, revoke it from **API Keys**.
