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_writepermission
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
- Create a new API key under Organization Settings > API Keys.
- Deploy it everywhere that reads
DD_API_KEY. Both keys work in the meantime. - 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
- Datadog: API and application keys
- Datadog API: Key management
- Datadog: Agent environment variables
- datadog-api-client-python: reads DD_API_KEY
- datadog-api-client-typescript: reads DD_API_KEY
- datadog-api-client-go: reads DD_API_KEY
- datadog-api-client-ruby: reads DD_API_KEY
- datadog-api-client-java: reads DD_API_KEY