Import from Opsgenie
Preview and run an import of teams, members, schedules with rotations, future overrides, escalations, services, alert sources and heartbeats from Opsgenie.
POST /api/im/import/opsgenie/preview · POST /api/im/import/opsgenie/apply
Moves the structure of an Opsgenie account into Incident Management. Uptimeify reads Opsgenie through its official REST API with GET requests only and changes nothing there. The Opsgenie API key travels in the request body, is used for that request only and is never stored. Alerts and incidents are not imported.
Both endpoints take the same body and read Opsgenie afresh. preview writes nothing and answers what an import would create. apply creates it through the same endpoints the dashboard and the Terraform provider use (teams, team members, tiers, schedules, schedule overrides, services, alert sources, heartbeat monitors), so every limit and permission of those endpoints applies, and every created object is in the audit log.
Running it again is safe. Uptimeify remembers which Opsgenie ID became which object. A second run creates only what is new or was deleted since; what is still there is reported as exists and left as is.
The same page is in the dashboard under Incidents > Teams > Import.
Authentication
Session or organization API token of an organization admin. Other roles get 403 forbidden. CLI tokens cannot call these endpoints (they would hand a third-party key to the CLI). Both endpoints together allow 20 calls per hour and organization (429 rateLimited).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
apiKey | string | yes | Opsgenie API key with read access (Settings > API key management), 8 to 200 characters. |
region | string | no | us (default, api.opsgenie.com) or eu (api.eu.opsgenie.com). No other host is ever called. |
inviteMissing | boolean | no | Default false: Opsgenie users without an account in your organization are listed in missingUsers and left out. true: they are invited like team invite (role responder, invitation mail). |
heartbeatCustomerId | integer | null | no | Customer the heartbeat monitors are created under. Without it heartbeats are skipped. |
Unknown fields are rejected with 400 invalidRequestBody.
How Opsgenie maps
| Opsgenie | Uptimeify |
|---|---|
| Team | Team. The team time zone is the time zone of its first schedule. |
| Team member | Team member, matched by email (case-insensitive) to existing users of your organization. Role admin stays admin, everything else becomes member. Inactive accounts and accounts without an IM role (notEligible) are left out. |
| Escalation of the team | The tier ladder of the team. Rules with the same delay share one tier; the time between two tiers is the difference of their delays. if-not-closed becomes stop mode resolved. A repeat (count, waitInterval) becomes team escalationRepeats, the last tier then escalates after waitInterval minutes. Only the first escalation of a team is imported; a team has one ladder in Uptimeify. |
| Rule recipient: schedule | Each rotation of that schedule becomes a schedule of the tier. |
| Rule recipient: user | The tier pages that person around the clock. |
Rule recipient: team, notifyType users/admins | Not imported (recipientTeam). |
Rotation (daily, weekly, hourly, length) | Schedule with rotationMode: auto, one person per period in Opsgenie order, starting at the rotation startDate (effectiveFrom). weekly 1 = weekly, 2 = biweekly, otherwise custom. A rotation with one person becomes none. Time restrictions become weeklySchedules; a window over midnight is split in two. |
| Schedule override (future only) | online override on each imported schedule of the named rotations. |
| Team without escalation | Its schedules become one tier. |
| Routing rule | Needs no own object when it points at the team escalation or an imported schedule (listed in covered). Rules that notify nobody or point elsewhere are listed in skipped. |
| Service | Service, owner team if imported. Opsgenie offers services on Standard and Enterprise only; on other plans the list stays empty. |
| Integration | Alert source of the integration team: Datadog datadog, Grafana grafana, Prometheus alertmanager, Sentry sentry, Zabbix zabbix, Email email, API and Webhook custom. Other types and disabled integrations are skipped. Point the tool to the new webhook address afterwards. |
| Heartbeat | Heartbeat monitor of heartbeatCustomerId with the same interval (at most 30 days). Disabled heartbeats are skipped. Counts against the monitor quota. |
Preview
POST /api/im/import/opsgenie/preview
curl -X POST "$BASE_URL/api/im/import/opsgenie/preview" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"apiKey":"<opsgenie key>","region":"eu","heartbeatCustomerId":12}'200 OK (shortened):
{
"provider": "opsgenie",
"teams": [
{
"sourceId": "og-t-ops",
"status": "create",
"existingId": null,
"name": "Ops",
"timezone": "Europe/Berlin",
"escalationRepeats": 2,
"escalationRepeatsAfterMinutes": 0,
"escalationRepeatsStopMode": "acknowledged",
"members": [
{ "email": "anna@example.com", "name": "Anna", "userId": "u_1", "imRole": "admin", "status": "add" },
{ "email": "dora@example.com", "name": "Dora", "userId": null, "imRole": "member", "status": "missing" }
],
"tiers": [
{
"sourceKey": "og-e-ops:0",
"status": "create",
"existingId": null,
"delayMinutes": 0,
"autoEscalationEnabled": true,
"autoEscalationAfterMinutes": 10,
"autoEscalationStopMode": "acknowledged",
"userEmails": [],
"schedules": [
{
"sourceKey": "og-s-ops:og-r-week",
"status": "create",
"existingId": null,
"name": "Ops_schedule / Week",
"timezone": "Europe/Berlin",
"effectiveFrom": "2026-11-30T08:00:00.000Z",
"effectiveUntil": null,
"weeklySchedules": [],
"rotationMode": "auto",
"rotationRepeats": "weekly",
"customRepeatUnit": null,
"customRepeatValue": null,
"autoRotationSize": 1,
"startsOnDayOfWeek": 1,
"startsOnTime": "09:00",
"memberEmails": ["anna@example.com", "ben@example.com"]
}
]
}
],
"overrides": []
}
],
"services": [{ "sourceId": "og-svc-1", "status": "create", "existingId": null, "name": "Checkout", "description": null, "teamSourceId": "og-t-ops" }],
"sources": [{ "sourceId": "og-i-dd", "status": "create", "existingId": null, "name": "Datadog Prod", "opsgenieType": "Datadog", "type": "datadog", "teamSourceId": "og-t-ops" }],
"heartbeats": [{ "sourceId": "nightly-backup", "status": "create", "existingId": null, "name": "nightly-backup", "intervalMinutes": 1440 }],
"missingUsers": [{ "email": "dora@example.com", "fullName": "Dora" }],
"skipped": [{ "kind": "escalationRule", "name": "Ops_escalation: Database (+60 min)", "reason": "recipientTeam", "team": "Ops" }],
"covered": [{ "kind": "routingRule", "name": "Default", "reason": "routingCoveredByTeam", "team": "Ops" }]
}status is create (will be created) or exists (created by an earlier run and still there; existingId is its id). skipped[].reason names why something is not imported, for example rotationNoMembers, rotationEnded, participantNotUser, recipientTeam, escalationNotPrimary, scheduleNotInEscalation, routingNotifyNone, integrationTypeUnsupported, heartbeatIntervalUnsupported, heartbeatNeedsCustomer.
Apply
POST /api/im/import/opsgenie/apply, same body. Reads Opsgenie again and creates what the preview shows as create.
200 OK:
{
"provider": "opsgenie",
"created": { "teams": 2, "members": 4, "invited": 0, "tiers": 3, "schedules": 3, "overrides": 1, "services": 2, "sources": 3, "heartbeats": 1 },
"existing": { "teams": 0, "members": 0, "tiers": 0, "schedules": 0, "overrides": 0, "services": 0, "sources": 0, "heartbeats": 0 },
"failed": [],
"sources": [{ "name": "Datadog Prod", "type": "datadog", "team": "Ops", "ingestToken": "<shown once>", "inboundEmailAddress": null }],
"heartbeats": [{ "name": "nightly-backup", "heartbeatToken": "<shown once>" }],
"missingUsers": [{ "email": "dora@example.com", "fullName": "Dora" }],
"skipped": []
}failedlists objects one of the create endpoints rejected, with itscodeand message, for examplemonitorQuotaReachedfor a heartbeat over the monitor quota. Everything else is still created; fix the cause and run the import again.sources[].ingestTokenis shown here once, as with create alert source. The webhook address is$BASE_URL/api/im/ingest/<ingestToken>.
Common errors
| Status | data.code | When |
|---|---|---|
400 | invalidRequestBody | Missing or wrong field, unknown field. |
400 | importSourceUnauthorized | Opsgenie rejected the key (wrong key, wrong region, no read access). |
400 | importTooLarge | More than 100 teams, 200 schedules or 400 changes in one run. |
403 | forbidden | Not an organization admin. |
429 | rateLimited | More than 20 calls per hour and organization. |
502 | importSourceUnavailable / importSourceRateLimited | Opsgenie not reachable, answered with an error or its rate limit. |
Team Overrides
List, add, edit and delete the on-call overrides of a team, both team-level overrides and those attached to one of the team's schedules.
Team On-Call and Statistics
Read who is on call for a team right now, the team's on-call calendar for a time window, and the team's incident statistics.