Skip to main content
POST
/
v1
/
alert_routes
Creates an alert route
curl --request POST \
  --url https://api.rootly.com/v1/alert_routes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "alert_routes",
    "attributes": {
      "name": "<string>",
      "enabled": true,
      "alerts_source_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "owning_team_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "rules": [
        {
          "name": "<string>",
          "position": 123,
          "fallback_rule": true,
          "destinations": [
            {
              "target_type": "Service",
              "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            }
          ],
          "condition_groups": [
            {
              "position": 123,
              "conditions": [
                {
                  "property_field_condition_type": "is_one_of",
                  "property_field_name": "<string>",
                  "property_field_type": "attribute",
                  "property_field_value": "<string>",
                  "property_field_values": [
                    "<string>"
                  ],
                  "alert_urgency_ids": [
                    "<string>"
                  ],
                  "conditionable_type": "AlertField",
                  "conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}'
{
  "data": {
    "id": "b1f66aed-2198-438e-a998-f9099fb8bf79",
    "type": "alert_routes",
    "attributes": {
      "name": "Test Alert Route d4b9",
      "enabled": true,
      "created_at": "2025-10-09T08:33:10.160-07:00",
      "updated_at": "2025-10-09T08:33:10.160-07:00",
      "alerts_source_ids": [
        "16724578-a3ba-474b-ac39-7d929f551260"
      ],
      "owning_team_ids": [
        "b3124238-5603-4525-a560-9465a60a5728"
      ]
    },
    "relationships": {
      "alert_routing_rules": {
        "data": [
          {
            "id": "b96e87bc-3b9d-4b34-bdd0-d016c34427f5",
            "type": "alert_routing_rules"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "b96e87bc-3b9d-4b34-bdd0-d016c34427f5",
      "type": "alert_routing_rules",
      "attributes": {
        "name": "Test Routing Rule",
        "alerts_source_id": null,
        "condition_type": "all",
        "enabled": true,
        "position": 1,
        "destination": {
          "id": "d406f920-1c22-4285-9b7c-fb39af4e94d3",
          "target_type": "Group",
          "target_id": "b3124238-5603-4525-a560-9465a60a5728",
          "created_at": "2025-10-09T08:33:10.172-07:00",
          "updated_at": "2025-10-09T08:33:10.172-07:00"
        },
        "created_at": "2025-10-09T08:33:10.166-07:00",
        "updated_at": "2025-10-09T08:33:10.166-07:00",
        "destinations": [
          {
            "id": "d406f920-1c22-4285-9b7c-fb39af4e94d3",
            "target_type": "Group",
            "target_id": "b3124238-5603-4525-a560-9465a60a5728",
            "created_at": "2025-10-09T08:33:10.172-07:00",
            "updated_at": "2025-10-09T08:33:10.172-07:00"
          }
        ],
        "condition_groups": [
          {
            "id": "bf777bcf-6c62-486b-bdc0-47a827d9e692",
            "position": 1,
            "created_at": "2025-10-09T08:33:10.173-07:00",
            "updated_at": "2025-10-09T08:33:10.173-07:00",
            "conditions": [
              {
                "id": "fb1f3643-bd93-42a1-8813-bdd9fd324a75",
                "property_field_condition_type": "is_one_of",
                "property_field_name": "summary",
                "property_field_type": "attribute",
                "property_field_value": null,
                "property_field_values": [
                  "Error from system"
                ],
                "conditionable_id": null,
                "conditionable_type": null,
                "created_at": "2025-10-09T08:33:10.176-07:00",
                "updated_at": "2025-10-09T08:33:10.176-07:00"
              }
            ]
          }
        ]
      },
      "relationships": {
        "owning_teams": {
          "data": []
        }
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/vnd.api+json
data
object

Response

create: handles mixed position types correctly

data
object
required
I