Skip to content

Opsgenie-compatible intake

An Opsgenie-compatible source accepts Opsgenie Alert API calls. A tool that already sends alerts to Opsgenie can keep that integration: change its API URL and key to the ones OnCallAlerting gives you. This only works for tools that let you set the URL.

oncallalerting.com/workspace?tab=integrations
The Opsgenie-compatible source setup dialog with the API key, the URL and Alert API examples The Opsgenie-compatible source setup dialog with the API key, the URL and Alert API examples
  1. In Integrations, select Add integration and choose Opsgenie Alert API.
  2. Enter a name, choose the escalation policy, and select Add integration.
  3. Copy the API key and the URL. The key is a UUID and is shown only once. Rotating it stops the old key straight away.

The URL points at /v2/alerts on your OnCallAlerting intake host.

Send the key in one of two ways:

  • Authorization: GenieKey YOUR_API_KEY
  • HTTP Basic authentication with an empty user name and the key as the password

A missing or unknown key gets 401 with {"message":"Could not authenticate"}.

# Prometheus Alertmanager (it appends v2/alerts to api_url)
receivers:
- name: oncallalerting
opsgenie_configs:
- api_key: YOUR_API_KEY
api_url: https://oncallalerting.com/
# Grafana Opsgenie contact point
# API Key: YOUR_API_KEY
# Alert API URL: https://oncallalerting.com/v2/alerts
Terminal window
# Any Alert API client
curl -X POST https://oncallalerting.com/v2/alerts \
-H 'Authorization: GenieKey YOUR_API_KEY' \
-H 'content-type: application/json' \
-d '{"message":"Disk 95% full on db1","alias":"db1-disk","priority":"P1"}'

Note the difference: Alertmanager's api_url is the host, and it adds v2/alerts itself. Grafana's "Alert API URL" is the full URL.

As of 2026-09-13:

ToolSettingStatus
Prometheus Alertmanageropsgenie_configs[].api_urlPayloads captured from Alertmanager 0.34 and covered by OnCallAlerting's tests
GrafanaOpsgenie contact point, "Alert API URL"Payloads captured from Grafana 13.2 and covered by OnCallAlerting's tests
KibanaOpsgenie connector "URL"; the host must be in xpack.actions.allowedHostsURL setting found in Kibana's source code. Not tested with OnCallAlerting.
ZabbixOpsgenie media type parameter opsgenie_apiURL setting found in its template. Not tested with OnCallAlerting.
CheckmkOpsgenie "Domain"URL setting found in its source code. Not tested with OnCallAlerting.

These offer only a region picker or a fixed host, so they cannot be pointed at OnCallAlerting: Uptime Kuma, Sentry and Datadog. Opsgenie's tool-specific /v1/json/ endpoints, used by the Jenkins opsgenie-plugin and the Icinga 2 integration, are not accepted.

POST /v2/alerts:

FieldRequiredNotes
messageYesBecomes the title, shortened to 300 characters
aliasNoThe deduplication key, up to 512 characters. When there is none, OnCallAlerting generates one.
descriptionNoThe start of the incident description
priorityNoP1-P5, default P3
detailsNoKept as incident details, up to 50 keys
tags, entity, source, noteNoAdded to the description. The first 20 tags are kept.
responders, visibleTo, actions, userNoAccepted and not used. The source's escalation policy decides who is notified.

Priority sets the severity:

PrioritySeverity
P1, P2critical
P3, or nonewarning
P4, P5info

A priority sent in the request is also set as the incident's priority.

When an open or acknowledged incident from this source already has the alias, the call adds an occurrence and notifies nobody.

  • POST /v2/alerts/IDENTIFIER/close resolves an alert.
  • POST /v2/alerts/IDENTIFIER/acknowledge acknowledges it. Escalation stops and pending Slack notifications are cancelled, the same as when a person acknowledges.

identifierType in the query string says what the identifier is:

identifierTypeIdentifier
id, or noneThe incident id in OnCallAlerting. Only incidents from this source match.
aliasThe alias. It matches the open or acknowledged incident with that alias, or the incident that alias was merged into.
tinyNot supported: 400 "OnCallAlerting does not issue tiny IDs. Use identifierType=id or identifierType=alias."

The body is optional. user or source is recorded as who did it, as "Acknowledged by" that name "via" the source name. note is added to the timeline entry.

Every response has Opsgenie's envelope with took and requestId. Create, close and acknowledge answer 202:

{"result": "Request will be processed", "took": 0.012, "requestId": "..."}

Opsgenie processes requests later. OnCallAlerting applies them straight away and keeps the outcome for 3 days. Read it with GET /v2/alerts/requests/REQUEST_ID:

{
"data": {
"success": true,
"isSuccess": true,
"action": "Create",
"processedAt": "2026-09-13T14:02:11.482Z",
"integrationId": "...",
"status": "Created alert",
"alertId": "9a0c...",
"alias": "db1-disk"
},
"took": 0.004,
"requestId": "..."
}
statusMeaning
Created alertA new incident opened
Alert with this alias is already open; count increasedAn occurrence was added
Closed alert, Acknowledged alertThe action was applied
Alert does not existNo matching incident. success is false.
Alert is already closedThe incident was already resolved. success is false.

An unknown or expired request id gets 404 "Request not found. Request records are kept for 3 days."

Errors:

CodeMeaning
400The body is not valid JSON
401Missing or unknown key
413The body is over 512 KB
422Validation failed, with an errors object such as {"message":"Message can not be empty."}
429More than 240 requests a minute for this source