# Set up Opsgenie alerts

:::caution[Not yet available]
Opsgenie contacts can't be created in HostTracker today. The type exists in the contact-type catalogue and the
delivery/formatting logic is built, but it's deliberately excluded from the New Contact picker for every
account - its region (US/EU) and other setup details need a request member the contact-write API doesn't carry
yet. The steps below describe how it will work once that ships.
:::

Opsgenie integration works like PagerDuty: a Down alert creates an Opsgenie alert, and the matching Up alert
closes it. Under the hood an Opsgenie contact would be an `http` contact with its `gateway` set to `Opsgenie`
and its `address` holding an API key (a key, not a URL).

## Settings reference

| Setting (UI label) | API field (v2) | Type / allowed values | Default | Plan limits | What it does for you |
|---|---|---|---|---|---|
| Contact Type | `type` | `"http"` | - | - | Opsgenie is stored as a plain `http` contact |
| Gateway | `gateway` | `"Opsgenie"` | - | - | Routes through the Opsgenie Alerts API create/close flow |
| API key | `address` | The Opsgenie API integration key (not a URL) | - | - | Identifies the Opsgenie team the alert pages |

`groupedAlerts` will have no effect on this channel once it ships - see below.

## Add an Opsgenie contact (once available)

1. In Opsgenie, create an **API integration** for the team that should receive HostTracker alerts, and copy its
   **API key**.
2. In HostTracker, open **Contacts** and click **Add contact**.
3. Choose **Opsgenie**.
4. Paste the API key and give the contact a name.
5. Save.

## How it behaves

- A **Down** alert **creates** a new Opsgenie alert; the matching **Up** alert **closes** it automatically.
- On-call channels are **never grouped** - every Down and Up is sent as its own event so nothing gets folded
  into a summary message, regardless of the contact's `groupedAlerts` setting. See
  [grouped alerts](/alerts/grouped-alerts/).

## Do it with the API or MCP

The type is registered (`GET /contact/type` lists it, `creatable: false`), but creating one is refused today
with `422 contact_type_not_creatable`. There's no API or MCP workaround while the channel is parked.

## Limits and gotchas

- **Not creatable today** - see the caution above.
- Once available: paste the **API key** exactly as Opsgenie gives it, with no extra scheme or whitespace, and
  [test the contact](/alerts/test-a-contact/) after setup to confirm a real alert appears in Opsgenie.
- As a **recognized gateway**, Opsgenie is already wired to receive certificate-expiry, domain-expiry, DNSBL
  blacklist and Web Risk notices once creation ships - the delivery logic doesn't wait on that fix, only
  contact creation does.

## Related

- [PagerDuty](/alerts/channels/pagerduty/)
- [Grouped alerts](/alerts/grouped-alerts/)
- [All channels](/alerts/channels/)
