An Opsgenie API key authenticates calls to the Opsgenie REST API. Depending on the access rights set on that key, it can create, acknowledge and close alerts, read on-call schedules and contact details, and change integrations. The main danger is on the operations side: an attacker can silence real incidents by closing alerts, flood your team with fake ones, or learn who is on call and how to reach them. Delete the key first, then investigate.
Check your GitHub account for leaked secrets — free
- Provider
- Opsgenie
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What an Opsgenie API key looks like
An Opsgenie API key is a UUID: 36 lowercase hexadecimal characters in groups of 8, 4, 4, 4 and 12, separated by dashes:
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX Opsgenie API key (masked UUID)
Authorization: GenieKey XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
The key is sent in an Authorization: GenieKey header to api.opsgenie.com, or to api.eu.opsgenie.com for accounts hosted in the EU. A UUID is also the format of thousands of harmless identifiers, so context is what identifies it: variable names such as OPSGENIE_API_KEY, the GenieKey header, or the API host.
Keys exist in two places. An integration has its own API key, created when you add an integration such as a monitoring tool, and it is limited by the rights of that integration. The account also has an API key management page, where keys carry access rights such as read, create and update, or delete. A key from the second place is usually broader, so check which one leaked.
How Opsgenie API keys get leaked
- Alerting scripts. A cron job or deployment script that creates alerts, committed with the key inline.
- Monitoring and infrastructure code. Terraform, Helm values, Prometheus Alertmanager or similar configuration with the key in plain text.
- Committed environment files.
OPSGENIE_API_KEYin a.envfile or a container definition. - CI pipelines. A deployment notification step that calls Opsgenie, with the key in the pipeline file or in a debug log.
- Runbooks and wikis. A curl example pasted into documentation or a ticket, later published or mirrored.
What to do in the first hour
- Find the key in Opsgenie. In the account, open the place where API keys are listed (the settings area for API key management, or the integration that owns the key) and match the leaked value by its last characters.
- Delete the key and create a new one. Do this before anything else. Give the new key only the access rights it needs, for example create only for a sender that just raises alerts.
- Deploy the new key to the monitoring tool or script, then trigger a test alert to confirm it reaches the right team.
- Audit the alerts. Look at the alert list for the period since the exposure: alerts you did not expect, alerts closed or acknowledged without a human, and spikes of volume. Open the alert log of suspicious items to see which integration or key acted.
- Check what could have been changed. Review integrations, teams, escalation policies and on-call schedules for entries you do not recognize, and check the list of users and contact methods.
- Look at notification channels. An attacker with write rights could add an outgoing integration that forwards alert data to a URL they control. Remove anything unfamiliar.
- Clean up the code and search for other secrets next to the key. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Opsgenie
Opsgenie API keys are removed from the Opsgenie account after you sign in as an owner or administrator. Keys that belong to an integration are shown on that integration page, and keys managed centrally are listed in the settings area for API key management. A person has not confirmed the exact menu wording for this guide, and the interface can change, so look for the section where API keys are listed, select the exposed one and delete it. Deleting a key makes it unusable for every tool that relied on it, so prepare the replacement first when the situation allows. The Atlassian support documentation for Opsgenie describes API key management, so check it if the menus differ.
How LeakWatch detects it
The rule is called Opsgenie API Key. It looks for the word opsgenie in any letter case, followed within 40 characters (line breaks allowed) by a lowercase UUID-shaped value with word boundaries on both sides. A UUID far from the word, an uppercase one, or one with a different grouping is not reported. That keeps false alerts low, but a key pasted without the word nearby can be missed. The severity is high. This type is not checked live: LeakWatch does not send any request to Opsgenie with the key it found.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Can an attacker close real incidents with this key?
If the key has the right to update or close alerts, yes. Review the closed and acknowledged alerts since the exposure, and use a new key with the narrowest rights.
Should I use a different key for each tool?
Yes. One key per integration lets you delete a single leaked key without breaking every other sender, and the alert log then shows which tool acted.
Is the key tied to a region?
The key works against the Opsgenie instance of your account, the US one or the EU one. Search your code for both API hosts, since the same repository may use either.