Keys / Datadog

DD_API_KEY

The Datadog API key the Agent and your app send metrics, logs and events with. Calls that read or change data also need an application key.

Expires
never
API
create, list, edit and delete, with the api_keys_write permission

Get it

Create one on app.datadoghq.com/organization-settings/api-keys. The steps aren't recorded yet.

Set it

DD_API_KEY=...

The Datadog Agent reads it, and the API clients for Python, TypeScript, Ruby and Java read it when you don't set a key. The Go client reads it in datadog.NewDefaultContext. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. Create a new API key under Organization Settings > API Keys.
  2. Deploy it everywhere that reads DD_API_KEY. Both keys work in the meantime.
  3. Check that nothing still uses the old key, then revoke it. You can restore a revoked key within 7 days.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16