POST
/
v1
/
alert_routing_rules
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",
      "condition_type": "all",
      "conditions": [
        {
          "property_field_type": "attribute",
          "property_field_name": "<string>",
          "property_field_condition_type": "is",
          "property_field_value": "<string>"
        }
      ],
      "destination": {
        "target_type": "Group",
        "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    }
  }
}'
{
  "data": {
    "id": "4d6d3788-1eb6-468f-acf9-d51bd3cf1c66",
    "type": "alert_routing_rules",
    "attributes": {
      "name": "Test Alert Routing Rule 1",
      "alerts_source_id": "5b39b640-5333-4d8c-9404-f41d9d54fdce",
      "condition_type": "all",
      "enabled": false,
      "created_at": "2025-04-18T09:44:31.878-07:00",
      "updated_at": "2025-04-18T09:44:31.878-07:00",
      "destination": {
        "id": "6104161e-0ffa-48f3-8040-cea052ab9227",
        "target_type": "Group",
        "target_id": "04abea03-b0ab-406c-8df1-76040df0b398",
        "created_at": "2025-04-18T09:44:31.880-07:00",
        "updated_at": "2025-04-18T09:44:31.880-07:00"
      },
      "conditions": [
        {
          "id": "a6ee5b29-a056-4e9b-abec-22c82c6b81b0",
          "property_field_condition_type": "is",
          "property_field_name": "description",
          "property_field_type": "attribute",
          "property_field_value": "Open",
          "created_at": "2025-04-18T09:44:31.881-07:00",
          "updated_at": "2025-04-18T09:44:31.881-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
required

Response

201
application/vnd.api+json
alert routing rule created
data
object
required