Creates a new alert route from provided data. Note: This endpoint requires access to Advanced Alert Routing. If you’re unsure whether you have access to this feature, please contact Rootly customer support.
For organizations with large numbers of routing rules, Rootly supports asynchronous rule processing to improve performance. When enabled, rule creation happens in the background.
Important: When async processing is enabled, the rules list in the API response will not be up-to-date immediately after creation. You should refetch the alert route after a few minutes to get the updated rules.
If you experience slow operations when managing alert routes with many rules, contact Rootly customer support to enable asynchronous rule processing for your organization.
curl --request POST \
--url https://api.rootly.com/v1/alert_routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_type": "Service",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_type": "attribute",
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"position": 123
}
],
"position": 123,
"fallback_rule": true
}
]
}
}
}
'{
"data": {
"id": "ad8c3409-5e59-42f3-8a6b-224f52558f52",
"type": "alert_routes",
"attributes": {
"name": "Test Alert Route bff3",
"enabled": true,
"created_at": "2026-01-03T21:24:13.638-08:00",
"updated_at": "2026-01-03T21:24:13.638-08:00",
"alerts_source_ids": [
"ef42bcbb-ef2a-45a1-b180-3c5d84de564e"
],
"owning_team_ids": [
"8882f574-dd62-466e-81d4-5fecb7ddd751"
],
"rules": [
{
"id": "7e0fc5da-2a60-4fb8-af36-2ef8be3f8eea",
"name": "Test Routing Rule",
"alerts_source_id": null,
"condition_type": "all",
"enabled": true,
"position": 1,
"destination": {
"target_type": "Group",
"target_id": "8882f574-dd62-466e-81d4-5fecb7ddd751"
},
"created_at": "2026-01-03T21:24:13.641-08:00",
"updated_at": "2026-01-03T21:24:13.641-08:00",
"destinations": [
{
"target_type": "Group",
"target_id": "8882f574-dd62-466e-81d4-5fecb7ddd751"
}
],
"condition_groups": [
{
"position": 1,
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_name": "summary",
"property_field_type": "attribute",
"property_field_value": null,
"property_field_values": [
"Error from system"
],
"conditionable_id": null,
"conditionable_type": null
}
]
}
],
"owning_teams": [],
"fallback_rule": false
}
]
}
}
}Was this page helpful?
curl --request POST \
--url https://api.rootly.com/v1/alert_routes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_type": "Service",
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_type": "attribute",
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"position": 123
}
],
"position": 123,
"fallback_rule": true
}
]
}
}
}
'{
"data": {
"id": "ad8c3409-5e59-42f3-8a6b-224f52558f52",
"type": "alert_routes",
"attributes": {
"name": "Test Alert Route bff3",
"enabled": true,
"created_at": "2026-01-03T21:24:13.638-08:00",
"updated_at": "2026-01-03T21:24:13.638-08:00",
"alerts_source_ids": [
"ef42bcbb-ef2a-45a1-b180-3c5d84de564e"
],
"owning_team_ids": [
"8882f574-dd62-466e-81d4-5fecb7ddd751"
],
"rules": [
{
"id": "7e0fc5da-2a60-4fb8-af36-2ef8be3f8eea",
"name": "Test Routing Rule",
"alerts_source_id": null,
"condition_type": "all",
"enabled": true,
"position": 1,
"destination": {
"target_type": "Group",
"target_id": "8882f574-dd62-466e-81d4-5fecb7ddd751"
},
"created_at": "2026-01-03T21:24:13.641-08:00",
"updated_at": "2026-01-03T21:24:13.641-08:00",
"destinations": [
{
"target_type": "Group",
"target_id": "8882f574-dd62-466e-81d4-5fecb7ddd751"
}
],
"condition_groups": [
{
"position": 1,
"conditions": [
{
"property_field_condition_type": "is_one_of",
"property_field_name": "summary",
"property_field_type": "attribute",
"property_field_value": null,
"property_field_values": [
"Error from system"
],
"conditionable_id": null,
"conditionable_type": null
}
]
}
],
"owning_teams": [],
"fallback_rule": false
}
]
}
}
}