Overview
Migrating from Opsgenie to Sizemotion? Our Opsgenie-compatible endpoint allows you to switch incident management platforms without reconfiguring your monitoring tools. Send the same alert payloads you use today—just change the endpoint URL and authentication token.
- Drop-in replacement for Opsgenie Create Alert API
- Same payload format - no code changes required
- Automatic priority mapping (P1-P5 → Sev 1-4)
- Preserve all Opsgenie metadata
- Compatible with existing monitoring integrations
- Idempotency using alias field
Migration Guide
Switching from Opsgenie requires only two changes to your existing configuration:
❌ Before (Opsgenie)
POST https://api.opsgenie.com/v2/alerts
Authorization: GenieKey abc123...
✅ After (Sizemotion)
POST https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5
Authorization: Bearer xyz789...
Setup Steps
Step 1: Get Your Webhook URL
Each team has a unique Opsgenie-compatible webhook URL:
- Navigate to Team Settings in your workspace
- Locate the Team Information section
- Note your Team ID (e.g.,
5) - Your webhook URL format:
https://sizemotion.com/api/v1/incidents/webhook/opsgenie/{TEAM_ID}
Step 2: Create API Token
- Go to Admin Settings → API Tokens
- Click Create New Token
- Name it descriptively (e.g., "Opsgenie Migration - Datadog")
- Save the token securely - it won't be shown again!
Step 3: Update Your Monitoring Tools
Update your existing alert configurations with the new endpoint:
Datadog Webhook
- Go to Integrations → Webhooks
- Edit your existing Opsgenie webhook
- Update URL to:
https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5 - Update custom header:
Authorization: Bearer YOUR_API_TOKEN - Keep your existing payload format
Prometheus AlertManager
Update your alertmanager.yml:
receivers:
- name: 'sizemotion-opsgenie'
webhook_configs:
- url: 'https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5'
http_config:
authorization:
credentials: 'YOUR_API_TOKEN'
send_resolved: false
Custom Scripts
Update your monitoring scripts with new values:
OPSGENIE_ENDPOINT="https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5"
OPSGENIE_API_KEY="Bearer YOUR_API_TOKEN"
Step 4: Test the Integration
Verify your setup:
- Send a test alert from your monitoring tool
- Check your Sizemotion workspace for the test incident
- Verify all metadata is preserved (tags, details, priority)
- Confirm severity mapping is correct
Field Mapping
Opsgenie to Sizemotion
All Opsgenie fields are preserved and mapped to Sizemotion:
| Opsgenie Field | Sizemotion Field | Notes |
|---|---|---|
message |
title |
Required - incident title |
alias |
external_id |
For idempotency |
description |
description |
Full alert context |
priority |
severity |
P1→Sev 1, P2→Sev 2, etc. |
tags |
tags |
Enriched with priority/source |
details |
metadata.details |
All key-value pairs |
responders |
metadata.responders |
Preserved for reference |
entity |
metadata.entity |
Added to tags as entity:{value} |
Priority Mapping
Opsgenie priority values automatically map to Sizemotion severities:
| Opsgenie Priority | Sizemotion Severity | Description |
|---|---|---|
P1 |
Sev 1 |
Critical - immediate action required |
P2 |
Sev 2 |
High - significant impact |
P3 |
Sev 3 |
Medium - moderate impact |
P4 |
Sev 4 |
Low - minimal impact |
P5 |
Sev 4 |
Informational (mapped to lowest) |
Examples
Python Script
Before (Opsgenie):
import requests
response = requests.post(
'https://api.opsgenie.com/v2/alerts',
headers={'Authorization': 'GenieKey abc123...'},
json={
'message': 'High CPU on prod-web-01',
'alias': 'cpu_alert_123',
'priority': 'P2',
'tags': ['production', 'web-server']
}
)
After (Sizemotion):
import requests
response = requests.post(
'https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5',
headers={'Authorization': 'Bearer xyz789...'},
json={
'message': 'High CPU on prod-web-01',
'alias': 'cpu_alert_123',
'priority': 'P2',
'tags': ['production', 'web-server']
}
)
cURL
Before (Opsgenie):
curl -X POST https://api.opsgenie.com/v2/alerts \
-H "Authorization: GenieKey abc123..." \
-H "Content-Type: application/json" \
-d '{
"message": "Database connection timeout",
"alias": "db_timeout_456",
"description": "Unable to connect to primary database",
"priority": "P1",
"tags": ["database", "production"],
"details": {
"host": "db-prod-01",
"duration": "30s"
}
}'
After (Sizemotion):
curl -X POST https://sizemotion.com/api/v1/incidents/webhook/opsgenie/5 \
-H "Authorization: Bearer xyz789..." \
-H "Content-Type: application/json" \
-d '{
"message": "Database connection timeout",
"alias": "db_timeout_456",
"description": "Unable to connect to primary database",
"priority": "P1",
"tags": ["database", "production"],
"details": {
"host": "db-prod-01",
"duration": "30s"
}
}'
Full Payload Example
All Opsgenie fields supported:
{
"message": "High memory usage detected",
"alias": "memory_alert_789",
"description": "Memory usage exceeded 85% on production server",
"priority": "P3",
"tags": ["production", "memory", "infrastructure"],
"entity": "prod-web-02",
"source": "prometheus",
"user": "monitoring-system",
"note": "Triggered from Prometheus alert",
"responders": [
{"type": "team", "name": "backend"},
{"type": "user", "username": "[email protected]"}
],
"visibleTo": [
{"type": "team", "name": "operations"}
],
"actions": ["restart", "scale"],
"details": {
"region": "us-east-1",
"instance": "i-1234567890abcdef0",
"memory_percent": "87.5",
"alert_url": "https://prometheus.example.com/alerts/789"
}
}
Troubleshooting
Webhook Not Creating Incidents
Check these common issues:
- Authorization Header: Must use "Bearer " prefix (not "GenieKey")
- Team ID: Ensure the team ID in the URL is correct
- API Token Permissions: Token must have
incidents:createpermission - URL Format: Should be
/api/v1/incidents/webhook/opsgenie/{team_id} - Content-Type: Must be
application/json
Duplicate Incidents
Duplicate prevention is automatic using the alias field:
- Same alias creates only one incident
- Different aliases create separate incidents
- If alias is omitted, a new incident is created each time
Priority Not Mapping Correctly
Verify priority format:
- Must be one of:
P1,P2,P3,P4,P5 - Case-insensitive:
p1,P1both work - Default is
P3(Sev 3) if omitted
Missing Alert Data
If incident details are incomplete:
- Verify
messagefield is present (required) - Check that JSON is properly formatted
- Review the incident metadata - all Opsgenie fields are preserved
Testing Your Webhook
To validate the integration:
- Send a test alert using cURL (see examples above)
- Check your Sizemotion workspace for the test incident
- Verify all metadata is captured correctly
- Confirm tags include enrichment (priority_p1, source_opsgenie, etc.)
Getting Help
If issues persist:
- Check Admin Settings → API Tokens for recent activity
- Review webhook logs in your monitoring tool
- See API Documentation for technical details
- Contact your workspace administrator
What's Supported
- ✅ Create Alert API (POST /v2/alerts) - fully compatible
- ✅ All alert fields (message, alias, priority, tags, details, etc.)
- ✅ Priority mapping (P1-P5)
- ✅ Idempotency via alias
- ✅ Auto-assignment to on-call responders
- ✅ Opsgenie-compatible response format
Next Steps
- API Documentation - Technical webhook reference
- Configure On-Call Schedules - Enable auto-assignment
- Incident Management - Learn about incident workflows
- Team Integrations - Connect other tools