Skip to main content
POST
/
v1
/
alert_routing_rules
Creates an alert routing rule
curl --request POST \
  --url https://api.rootly.com/v1/alert_routing_rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "alert_routing_rules",
    "attributes": {
      "name": "<string>",
      "enabled": true,
      "owning_team_ids": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "alerts_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "position": 123,
      "condition_type": "all",
      "conditions": [
        {
          "property_field_type": "attribute",
          "property_field_name": "<string>",
          "property_field_condition_type": "is_one_of",
          "property_field_value": "<string>",
          "property_field_values": [
            "<string>"
          ]
        }
      ],
      "destination": {
        "target_type": "Service",
        "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    }
  }
}'
{
  "data": {
    "id": "885285f9-5e54-4a08-a91f-8c53126f86a1",
    "type": "alert_routing_rules",
    "attributes": {
      "name": "Test Alert Routing Rule 1",
      "alerts_source_id": "13010335-fc26-4e2c-a961-1abfa0e0a29e",
      "condition_type": "all",
      "enabled": false,
      "position": 2,
      "destination": {
        "id": "aafcb6f2-f894-4d32-98f0-8ead4b15a4a1",
        "target_type": "Group",
        "target_id": "fdcb2cc9-88ca-467a-928b-da8ee48fbe9a",
        "created_at": "2025-10-11T22:13:36.312-07:00",
        "updated_at": "2025-10-11T22:13:36.312-07:00"
      },
      "created_at": "2025-10-11T22:13:36.310-07:00",
      "updated_at": "2025-10-11T22:13:36.310-07:00",
      "destinations": [
        {
          "id": "aafcb6f2-f894-4d32-98f0-8ead4b15a4a1",
          "target_type": "Group",
          "target_id": "fdcb2cc9-88ca-467a-928b-da8ee48fbe9a",
          "created_at": "2025-10-11T22:13:36.312-07:00",
          "updated_at": "2025-10-11T22:13:36.312-07:00"
        }
      ],
      "conditions": [
        {
          "id": "3d3a390a-9591-40cc-8ff7-e5ced2e46783",
          "property_field_condition_type": "is_one_of",
          "property_field_name": "description",
          "property_field_type": "attribute",
          "property_field_value": null,
          "property_field_values": [
            "Open"
          ],
          "conditionable_id": null,
          "conditionable_type": null,
          "created_at": "2025-10-11T22:13:36.315-07:00",
          "updated_at": "2025-10-11T22:13:36.315-07:00"
        }
      ]
    },
    "relationships": {
      "owning_teams": {
        "data": [
          {
            "id": "fdcb2cc9-88ca-467a-928b-da8ee48fbe9a",
            "type": "groups"
          }
        ]
      }
    }
  }
}

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
required

Response

alert routing rule created

data
object
required
I