Creates a new alert routing rule from provided data. Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don’t know whether you are an advanced user, please contact Rootly customer support.
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>",
"alerts_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination": {
"target_type": "Service",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"enabled": true,
"owning_team_ids": [
"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>"
]
}
]
}
}
}
'{
"data": {
"id": "3c39e6db-0ac1-496a-98c6-b0973ccbdc1a",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "50213f14-5357-483b-87d1-b2604013f910",
"condition_type": "all",
"enabled": false,
"position": 2,
"destination": {
"target_type": "Group",
"target_id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8"
},
"created_at": "2026-01-21T11:14:47.964-08:00",
"updated_at": "2026-01-21T11:14:47.964-08:00",
"destinations": [
{
"target_type": "Group",
"target_id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8"
}
],
"conditions": [
{
"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
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8",
"type": "groups"
}
]
}
}
}
}Was this page helpful?
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>",
"alerts_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination": {
"target_type": "Service",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"enabled": true,
"owning_team_ids": [
"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>"
]
}
]
}
}
}
'{
"data": {
"id": "3c39e6db-0ac1-496a-98c6-b0973ccbdc1a",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "50213f14-5357-483b-87d1-b2604013f910",
"condition_type": "all",
"enabled": false,
"position": 2,
"destination": {
"target_type": "Group",
"target_id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8"
},
"created_at": "2026-01-21T11:14:47.964-08:00",
"updated_at": "2026-01-21T11:14:47.964-08:00",
"destinations": [
{
"target_type": "Group",
"target_id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8"
}
],
"conditions": [
{
"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
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "2fb1a68e-7e62-4ef1-9c6d-ba04509cffe8",
"type": "groups"
}
]
}
}
}
}