Last updated

Short answer

OpsPing accepts a documented subset of the Opsgenie Alert API v2 at https://api.opsping.com: create alerts with the Opsgenie JSON shape and alias deduplication, then acknowledge, unacknowledge, close, snooze, and add notes, tags, or details by alert ID or tiny ID. Authenticate with a new OpsPing API key using the familiar GenieKey header. Most senders change only the URL and key; the main gap is that actions by alias (identifierType=alias) are not supported, so tools that auto-resolve through the Opsgenie API should use OpsPing's native webhook integrations for resolution.

Base URL and authentication

OpsgenieOpsPing
Base URLhttps://api.opsgenie.com or https://api.eu.opsgenie.comhttps://api.opsping.com (or your private deployment's hostname)
HeaderAuthorization: GenieKey <key>Authorization: GenieKey <key>, Authorization: OpsPingKey <key>, or X-OpsPing-Key: <key>
KeyOpsgenie integration or API keyA new OpsPing API key — POST requests need write scope
Create response202 with a requestId to poll202 with the alertId included

Supported endpoints

“Supported” means the path, method and core request shape match Opsgenie's Alert API v2. Response bodies are OpsPing's and are not guaranteed to be field-for-field identical to Opsgenie's.

EndpointStatusNotes
POST /v2/alertsSupportedOpsgenie-shaped body (fields below); deduplicates on alias
GET /v2/alertsOpsPing filtersquery, status, priority, source, limit, cursor; other parameters return 400
GET /v2/alerts/{id}SupportedBy alert ID or numeric tiny ID
GET /v2/alerts/countSupported
DELETE /v2/alerts/{id}SupportedNeeds a key with delete scope
POST /v2/alerts/{id}/acknowledgeSupportedOptional user is recorded as the actor
POST /v2/alerts/{id}/unacknowledgeSupported
POST /v2/alerts/{id}/closeSupportedBy alert ID or tiny ID only — not by alias
POST /v2/alerts/{id}/snoozeSupportedendTime (ISO 8601)
POST /v2/alerts/{id}/escalateDifferent behaviorAdvances the alert's own OpsPing escalation policy; an escalation object in the body is ignored
POST /v2/alerts/{id}/assignDifferent bodyTakes user or userId (plus note); Opsgenie's owner object is rejected with 400
POST / GET /v2/alerts/{id}/notesSupported
POST /v2/alerts/{id}/tagsSupportedBody tags array
DELETE /v2/alerts/{id}/tagsDifferent queryRemoves one tag with ?tag=; Opsgenie's comma-separated ?tags= is not read
POST /v2/alerts/{id}/detailsSupportedAdds custom details
POST /v2/alerts/{id}/respondersDifferent bodyTakes a responders array of OpsPing references; Opsgenie's single responder object is not read
GET /v2/alerts/{id}/logsDifferent pathUse GET /v2/alerts/{id}/activities
POST /v2/alerts/{id}/attachmentsDifferent flowPresigned upload (create, upload, complete); 10 MB, 10 per alert
GET /v2/alerts/requests/{requestId}Not supportedCreation is synchronous; use the returned alertId
?identifierType=alias / tinyNot supportedAction endpoints resolve alert ID or numeric tiny ID only
POST /v2/heartbeats/{name}/pingPOST onlyOpsgenie also accepts GET, PUT, PATCH; switch to POST
/v1/incidents, configuration APIsNot compatibleIncidents, schedules, teams and policies use OpsPing-native schemas

OpsPing also adds POST /v2/alerts/{id}/reopen and /unsnooze, which Opsgenie does not have. Every endpoint is documented in the API reference.

Fields accepted on POST /v2/alerts

FieldRules in OpsPing
messageRequired. 1–130 characters
aliasUp to 512 characters. Deduplication key: a new create with the alias of an open or acknowledged alert increments that alert's count instead of paging again
descriptionUp to 15,000 characters
priorityP1–P5; defaults to P3
sourceUp to 100 characters
entityUp to 512 characters
tagsUp to 20 strings, each up to 50 characters
detailsObject of string values
respondersUp to 50. user by id or username (email); team, schedule, escalation by OpsPing id. Name-only references are rejected
visibleTouser or team entries with an id
actionsUp to 10 strings, each up to 50 characters
userUp to 100 characters; recorded as the actor
noteUp to 25,000 characters
ownerMust reference an OpsPing user in your tenant

OpsPing-only optional fields: serviceId (link the alert to an OpsPing service), runbookUrl, recurrenceKey, and skipEscalation. A request that breaks a limit — for example, 21 tags — is rejected with 400 and a message naming the field, rather than being truncated.

The “supported subset” caveat

Test every integration before cutover: send a firing and a resolution and confirm the result in OpsPing.

Examples

Prometheus Alertmanager (opsgenie_configs)

Change api_url and api_key. Keep the trailing slash: Alertmanager appends v2/alerts to api_url. Remove any responders that name Opsgenie teams by name, or replace them with OpsPing IDs.

# alertmanager.yml — before (Opsgenie)
receivers:
  - name: opsgenie
    opsgenie_configs:
      - api_url: https://api.opsgenie.com/
        api_key: <opsgenie-api-key>

# alertmanager.yml — after (OpsPing): only the URL and key change
receivers:
  - name: opsgenie
    opsgenie_configs:
      - api_url: https://api.opsping.com/
        api_key: <opsping-api-key>
        # OpsPing does not close alerts by alias, so resolved
        # notifications from this receiver are not applied.
        send_resolved: false

Alerts are created and deduplicated per alert group. Because Alertmanager resolves Opsgenie alerts with close by alias, use the native mapper when you want resolved notifications to close alerts:

# Auto-close on resolution: use OpsPing's native Alertmanager mapper
receivers:
  - name: opsping
    webhook_configs:
      - url: https://api.opsping.com/v2/webhooks/inbound/<integration-id>/<token>
        send_resolved: true

Full field mapping: Alertmanager integration.

Grafana (Opsgenie contact point)

In Alerting → Contact points, edit the Opsgenie contact point: set Alert API URL to https://api.opsping.com/v2/alerts, paste a new OpsPing key as the API key, and turn off Auto close incidents. Or provision it from a file:

# Grafana contact point provisioning (provisioning/alerting/*.yaml)
apiVersion: 1
contactPoints:
  - orgId: 1
    name: opsping-opsgenie-compatible
    receivers:
      - uid: opsping_genie
        type: opsgenie
        settings:
          apiUrl: https://api.opsping.com/v2/alerts   # was https://api.opsgenie.com/v2/alerts
          apiKey: <opsping-api-key>                   # new OpsPing key, not the Opsgenie key
          autoClose: false      # close by alias is not supported
          sendTagsAs: details   # keeps label sets within the 20-tag limit

Grafana can send every alert label as a tag; with sendTagsAs: tags or both, an alert with more than 20 labels, or a key:value label longer than 50 characters, is rejected by the tag limits, so details is the safer setting. For alerts that close on resolution, use a Grafana webhook contact point with OpsPing's Grafana integration instead.

Scripts and custom tools (curl)

curl -X POST https://api.opsping.com/v2/alerts \
  -H "Authorization: GenieKey $OPSPING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Disk usage above 90% on db-1",
    "alias": "db-1-disk-usage",
    "description": "/var/lib/postgresql at 91%",
    "priority": "P2",
    "source": "cron-check",
    "entity": "db-1",
    "tags": ["database", "disk"],
    "details": {"mount": "/var/lib/postgresql", "threshold": "90"}
  }'

# 202 Accepted — OpsPing returns the alert ID directly:
# {"result": "...", "alertId": "<id>", "requestId": "...", "took": 0}
# Acknowledge, add a note, then close — by alert ID (or numeric tiny ID)
curl -X POST https://api.opsping.com/v2/alerts/$ALERT_ID/acknowledge \
  -H "Authorization: GenieKey $OPSPING_API_KEY" \
  -H "Content-Type: application/json" -d '{"user": "deploy-bot"}'

curl -X POST https://api.opsping.com/v2/alerts/$ALERT_ID/notes \
  -H "Authorization: GenieKey $OPSPING_API_KEY" \
  -H "Content-Type: application/json" -d '{"note": "Rotated logs, usage at 70%"}'

curl -X POST https://api.opsping.com/v2/alerts/$ALERT_ID/close \
  -H "Authorization: GenieKey $OPSPING_API_KEY" \
  -H "Content-Type: application/json" -d '{"user": "deploy-bot"}'

Heartbeats

curl -X POST https://api.opsping.com/v2/heartbeats/nightly-backup/ping \
  -H "Authorization: GenieKey $OPSPING_API_KEY"

OpsPing answers with JSON, not Opsgenie's plain-text PONG, so update scripts that check the response body.

FAQ

Is OpsPing a drop-in replacement for the Opsgenie API?

For alert creation and the common actions by alert ID, mostly yes: the same v2 paths, the Opsgenie JSON shape, alias deduplication and the GenieKey header. It is not a full drop-in: actions by alias (identifierType=alias) are not supported, assign, escalate, add-responder and tag removal take different input, request-status polling is not available, and configuration APIs use OpsPing-native schemas.

Which header do I use?

Send an OpsPing API key as Authorization: GenieKey <key>, Authorization: OpsPingKey <key>, or X-OpsPing-Key: <key>. All three take the new OpsPing key; your Opsgenie key will not work.

Will Alertmanager and Grafana auto-resolve alerts through the Opsgenie-compatible endpoint?

No. Both resolve Opsgenie alerts by calling close with identifierType=alias, which OpsPing does not support. Alerts are created and deduplicated, but stay open until closed. For automatic resolution, use OpsPing's native Alertmanager or Grafana webhook integration, which closes alerts by fingerprint.

What happens to responders in my existing payloads?

Responders must resolve to objects in your OpsPing tenant: users by ID or email username, and teams, schedules and escalations by OpsPing ID. A payload that names a team only by its Opsgenie name is rejected, so remove those responders and route with OpsPing integrations and routing rules, or replace them with OpsPing IDs.

Is there an EU endpoint like api.eu.opsgenie.com?

Use https://api.opsping.com whether your Opsgenie account was in the US or EU region. Private single-tenant deployments use their own hostname.

Opsgenie® is a trademark of Atlassian. OpsPing is not affiliated with, sponsored, or endorsed by Atlassian.

Full API referenceStep-by-step switch guide