API Key

An API key is the organization-level authentication key the Agent and integrations use when sending data to Datadog. The key used to operate the UI and API is called an application key, and it differs in both role and owner.

Overview

An API key is the key by which the sender of metrics and events identifies itself to Datadog, and it is unique to each organization. The Agent always needs one to run, and it is also used for sending from integrations and your own scripts. By contrast, an application key is the key for reading and writing dashboards and monitors through the API; it is tied to the user account of the person who created it and, by default, carries the same permissions as that person. The 3 situations where you care are initial Agent setup, authentication for automation scripts, and preparing for a staff departure or a key leak. Sorting out who holds how many keys and what each key can do lets you decide the scope to shut down without hesitation when an incident occurs.

The key for sending and the key for operating are different things

An API key is an organization-level key used by the side that sends data to Datadog. Datadog's official documentation states that the Agent requires an API key to submit metrics and events (as of September 2026, Source: API and Application Keys). The same kind of key is used not only by the Agent but also when sending from Integrations or your own scripts. On the other hand, to perform operations through the API such as creating a dashboard, listing monitors, or searching logs, you need an application key in addition to the API key. The first key point of this term is that the key for sending and the key for operating are separate.

API keys belong to the organization, application keys belong to a person

The 2 keys have different owners. An API key belongs to the organization and remains valid even if the account of the person who created it is disabled. An application key is tied to the user who created it, carries the same permissions as that person by default, and is revoked along with that user when the user is disabled (per the official documentation as of September 2026). Since they are also never transferred from one person to another, when you need a key shared by a team, you give it to a service account. This also answers the misconception that "one API key lets you do anything." An API key on its own can only send data; reading and writing configuration always requires a second key tied to a person. And because API keys are unique to each organization, they cannot be used in a different organization or a different Datadog Site.

How to use the 3 kinds of keys

When sending data from a browser or mobile app, a third kind of key, the client token, comes into play. Because an API key would be exposed on the user's side, the official documentation states explicitly that it cannot be used for sending from browser / mobile / TV apps, and specifies using a client token instead (as of September 2026).

Datadog's 3 kinds of keys (as of September 2026)
KeyMain useOwnerRevocation behavior
API keySending data from the Agent / integrations / scriptsOrganizationCan be restored for 7 days after revocation
Application keyReading and changing configuration through the APIThe user who created itPermissions can be narrowed with scopes / cannot be transferred to another user
Client tokenSending logs from browsers and mobile, and RUMOrganizationCannot be restored once deleted / remains valid even if the creator is disabled
Source: Datadog official documentation API and Application Keys (as of September 2026)

All 3 are listed, created, and revoked from the Organization Settings screen. The procedures are left to the official documentation; here we focus on the design of what to give to whom.

Narrowing permissions with scopes

Application keys can be given authorization scopes. A key with specified scopes can only perform operations within the specified range, which makes a least-privilege design possible, such as not giving an application that only reads dashboards the permissions for user management or data deletion (per the official documentation as of September 2026). There are 2 points to watch. A key created without scopes carries all the same permissions as its creator, and if the creator's role changes later, the scopes do not change automatically. There is also a One-Time Read mode that displays the secret value only once, at creation time; in organizations created on or after August 20, 2025, it is enabled by default and cannot be changed. In existing organizations an administrator can enable it, and once it has stayed enabled for 3 months it becomes permanent.

How many to create - designing rotation and revocation

The official documentation recommends separating API keys by purpose. The examples it gives are assigning separate keys to the Agent on Kubernetes, an on-premises configuration management tool, Terraform automating dashboards, and developers' local environments. If they are separated, revoking one does not stop the other routes, and periodic rotation can proceed one route at a time. The built-in limit is 50 API keys per organization, and exceeding it means consulting support (as of September 2026). A revoked API key remains in the list and can be restored for 7 days, but after 7 days it is permanently deleted. Creating or revoking a key involves a propagation delay of a few seconds, so using a key immediately after creating it can return 401 or 403. The official documentation directs you to use the /api/v1/validate endpoint to check this.

The first thing to do when a key leaks

If you have committed a key to a public repository, deleting the file alone does not make you safe. The official documentation cautions that a third party may already have obtained it even after deletion. The order it presents is: revoke the affected key, remove it from the public files and the commit history, create a new key and update each service, and review any users added or permission changes made (as of September 2026). However, it notes that revoking a widely used key first will stop services, so when you cannot gauge the impact, finish preparing the new key first. The premise for completing this procedure quickly is the separation by purpose described in the previous section. If you know what each key is used for, you can decide the scope to shut down without hesitation.

Share