# Retrieving OpsGenie API Key

{% hint style="info" %}
To view/read/write API Key in Opsgenie, you need to have Owner / Admin Role.
{% endhint %}

## There are 2 ways to get to OpsGenie API Key

<details>

<summary>Use an existing Key</summary>

You can retrieve your existing key from Get the API key from here :

[https://\<opsgenie-account>.app.opsgenie.com/settings/api-key-management](https://pagerly-2.app.opsgenie.com/settings/api-key-management)

**Note: For Pagerly to work fully, we would need the API key with 3 Access Rights:**\
Read, Create and Update, Configuration Access

</details>

<details>

<summary>Generate a new Key</summary>

You can create a new key for Pagerly :

1. In the web app, navigate to **Settings (**[https://\<opsgenie-account>.app.opsgenie.com/settings](https://pagerly-2.app.opsgenie.com/settings/api-key-management)**)**
2. Go to API Settings and then click API Key Management
3. Click **Add new API Key**
4. Generate a new API Key **with 3 Access Rights:** Read, Create and Update, Configuration Access

</details>

#### Permission levels

Pagerly needs only 3 Access Rights:\
Read, Create and Update, Configuration Access

Details below about all the Permission scope in OpsGenie API Key:

<table><thead><tr><th width="180">Role</th><th>Permission Scope</th></tr></thead><tbody><tr><td>Read</td><td>Only Read data from your Opsgenie account</td></tr><tr><td>Create and Update</td><td>Can read and write data</td></tr><tr><td>Configuration access</td><td>For OpsGenie APIs to work</td></tr><tr><td>Delete</td><td>Delete any resource ( Pagerly does not need this Role)</td></tr></tbody></table>

**The next Step is to create a team**


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
