> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/how-to-work-with-pagerly/integrating-with-your-paging-tool/retrieving-datadog-api-key.md).

# Retrieving Datadog API Key

To integrate with **Datadog**, Pagerly requires **both of the following keys**:

***

### ✅ Required Keys

#### 1. API Key (Required)

* Used for:
  * Authenticating requests
  * Basic data access

***

#### 2. Application Key (Required)

* Used for:
  * Accessing sensitive resources like:
    * On-call schedules
    * Users
    * Rotations
* This is **mandatory** for on-call APIs

***

### 📌 Summary

👉 For Pagerly to work fully with Datadog, we need:

* **API Key + Application Key**
* With **Read access to On-call & Users**
* (Write access optional — only if you plan to modify schedules later)

***

### 🔑 How to Generate API Key

<figure><img src="/files/RA0h3ZQpd6cLKPqrw6ZG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ZBuXBUgNrvgw343lKcz0" alt=""><figcaption></figcaption></figure>

####

#### Step-by-step:

1. Go to Datadog
2. Navigate to:\
   👉 **Organization Settings → API Keys**
3. Click **“New API Key”**
4. Give it a name (e.g., `pagerly-integration`)
5. Copy the generated key

***

### 🔑 How to Generate Application Key

#### Step-by-step:

1. Go to:\
   👉 **Organization Settings → Application Keys**
2. Click **“New Application Key”**
3. Select:
   * **Scoped Application Key** (recommended)
4. Assign permissions:
   * ✅ `on_call_read`
   * ✅ `users_read`
   * (Optional) `on_call_write`
5. Generate and copy the key

***

### ⚙️ Permission Levels (Datadog)

Unlike PagerDuty, Datadog uses:

#### 1. API Key

* No granular permissions
* Used for authentication

#### 2. Application Key

* Scoped permissions (fine-grained)
* Controls access to:
  * On-call schedules
  * Users
  * Teams

***

### 🚀 Next Step

👉 Now that keys are ready:

* Add **API Key + App Key** in Pagerly
* Configure **Schedule ID**
* Create Team

***

### 🔥 Important Notes

* Keys are tied to a **Datadog site**:
  * `datadoghq.com` (US)
  * `datadoghq.eu` (EU)
  * etc.
* Make sure:
  * Keys and API calls use the same site
* Store keys securely (they provide full account access)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pagerly.io/how-to-work-with-pagerly/integrating-with-your-paging-tool/retrieving-datadog-api-key.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
