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

# Authentication

> Authenticate requests with your Datalyr API key.

Create or copy your API key from **Settings → API** in Datalyr.

Send your key as a bearer token:

```bash theme={null}
curl "https://api.datalyr.com/v1/workspace" \
  --header "Authorization: Bearer dk_your_api_key"
```

Both workspace keys beginning with `dk_` and agent keys beginning with `dk_agent_` can authenticate requests.

<Warning>
  Keep API keys on your server. Do not include them in public source code or expose them in a browser bundle.
</Warning>
