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": "2037205b-f77f-4197-b46d-3e1673b239a3",
    "type": "alert_routing_rules",
    "attributes": {
      "name": "Test Alert Routing Rule 1",
      "alerts_source_id": "4ee46ca1-96bb-40c0-9be1-2719af99d267",
      "condition_type": "all",
      "enabled": false,
      "position": 2,
      "destination": {
        "id": "0958c6a9-ff0f-4b63-9906-de5cdad68456",
        "target_type": "Group",
        "target_id": "869ce8f4-f126-4b0e-bbd1-fcfa9c72213d",
        "created_at": "2025-08-11T23:17:08.719-07:00",
        "updated_at": "2025-08-11T23:17:08.719-07:00"
      },
      "created_at": "2025-08-11T23:17:08.717-07:00",
      "updated_at": "2025-08-11T23:17:08.717-07:00",
      "destinations": [
        {
          "id": "0958c6a9-ff0f-4b63-9906-de5cdad68456",
          "target_type": "Group",
          "target_id": "869ce8f4-f126-4b0e-bbd1-fcfa9c72213d",
          "created_at": "2025-08-11T23:17:08.719-07:00",
          "updated_at": "2025-08-11T23:17:08.719-07:00"
        }
      ],
      "conditions": [
        {
          "id": "6946308a-12a7-402e-9297-023b88d13af5",
          "property_field_condition_type": "is_one_of",
          "property_field_name": "description",
          "property_field_type": "attribute",
          "property_field_value": null,
          "property_field_values": [
            "Open"
          ],
          "created_at": "2025-08-11T23:17:08.724-07:00",
          "updated_at": "2025-08-11T23:17:08.724-07:00"
        }
      ]
    },
    "relationships": {
      "owning_teams": {
        "data": [
          {
            "id": "869ce8f4-f126-4b0e-bbd1-fcfa9c72213d",
            "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

Response

201
application/vnd.api+json

alert routing rule created

The response is of type object.