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": "9ea9418b-260a-4970-a350-99b8452adbde",
    "type": "alert_routing_rules",
    "attributes": {
      "name": "Test Alert Routing Rule 1",
      "alerts_source_id": "9d4cdc5d-e5b0-42a5-af57-8597483bc275",
      "condition_type": "all",
      "enabled": false,
      "created_at": "2025-04-20T05:17:44.475-07:00",
      "updated_at": "2025-04-20T05:17:44.475-07:00",
      "destination": {
        "id": "bb754863-1778-423f-95ad-4147cf4cb113",
        "target_type": "Group",
        "target_id": "35798a72-f9e9-4db9-a30f-80486a9e4bc5",
        "created_at": "2025-04-20T05:17:44.477-07:00",
        "updated_at": "2025-04-20T05:17:44.477-07:00"
      },
      "conditions": [
        {
          "id": "5029b92c-36c0-440f-a9a9-4f614a2eb967",
          "property_field_condition_type": "is",
          "property_field_name": "description",
          "property_field_type": "attribute",
          "property_field_value": "Open",
          "created_at": "2025-04-20T05:17:44.478-07:00",
          "updated_at": "2025-04-20T05:17:44.478-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