Skip to main content
POST
/
v2
/
alerts
curl -X POST "https://api.warrn.io/v2/alerts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer warrn_k8sM2vL9xQ7nP4wR..." \
  -d '{
    "message": "CPU usage above 95% on web-server-03",
    "alias": "cpu-high-web-03",
    "description": "CPU has been above 95% for 5 minutes. Likely caused by increased traffic.",
    "priority": "P1",
    "responders": [
      {"type": "team", "name": "Infrastructure"}
    ],
    "tags": ["cpu", "infrastructure", "production"],
    "details": {
      "host": "web-server-03",
      "cpu_percent": "97.3",
      "region": "us-east-1"
    },
    "entity": "web-frontend",
    "source": "Datadog Monitor #4521"
  }'
{
  "result": "Request will be processed",
  "took": 0.0,
  "requestId": "f7a8b9c0-d1e2-3456-7890-abcdef123456",
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "alias": "cpu-high-web-03",
    "name": "CPU usage above 95% on web-server-03"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.warrn.io/llms.txt

Use this file to discover all available pages before exploring further.

Create an alert using the OpsGenie request format. Warrn automatically transforms the payload to its native format.

Authentication

Authorization
string
required
Bearer token. Format: Bearer warrn_xxx. Requires write permission.

Request Body

message
string
required
Alert message. Maps to alert name in Warrn. Max 255 characters (longer messages are truncated and stored in metadata).
alias
string
Alert alias for deduplication. Use a stable identifier so you can reference this alert later (e.g. to close it). Example: disk-usage-web-01.
description
string
Detailed description of the alert.
priority
string
default:"P3"
OpsGenie priority. One of: P1, P2, P3, P4, P5. Mapped to Warrn severity (P1→critical, P2→high, P3→medium, P4/P5→low).
responders
object[]
List of responders. Warrn resolves the first team-type responder by name.
[{"type": "team", "name": "Platform"}]
tags
string[]
List of tags. An opsgenie-migrated tag is added automatically.
details
object
Key-value pairs stored as alert metadata in Warrn.
entity
string
Entity name. Warrn resolves this to a service by name match.
source
string
Source of the alert. Stored in metadata.
user
string
Display name of the user creating the alert. Stored in metadata.
note
string
Additional note. Stored in metadata.
visibleTo
object[]
Visibility restrictions. Stored in metadata (not enforced).

Response

Returns an OpsGenie-formatted success response with the alert ID and alias.
result
string
Always "Request will be processed".
data.id
string
The Warrn alert UUID.
data.alias
string
The alias you provided (or null).
requestId
string
Unique request ID for tracing.

Example

curl -X POST "https://api.warrn.io/v2/alerts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer warrn_k8sM2vL9xQ7nP4wR..." \
  -d '{
    "message": "CPU usage above 95% on web-server-03",
    "alias": "cpu-high-web-03",
    "description": "CPU has been above 95% for 5 minutes. Likely caused by increased traffic.",
    "priority": "P1",
    "responders": [
      {"type": "team", "name": "Infrastructure"}
    ],
    "tags": ["cpu", "infrastructure", "production"],
    "details": {
      "host": "web-server-03",
      "cpu_percent": "97.3",
      "region": "us-east-1"
    },
    "entity": "web-frontend",
    "source": "Datadog Monitor #4521"
  }'
{
  "result": "Request will be processed",
  "took": 0.0,
  "requestId": "f7a8b9c0-d1e2-3456-7890-abcdef123456",
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "alias": "cpu-high-web-03",
    "name": "CPU usage above 95% on web-server-03"
  }
}