Creates a new alert routing rule from provided data
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": "f1fbd52a-7512-4f65-8ce1-5e1596e8550a",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "7894fd70-da73-45bc-b136-af11174b47e4",
"condition_type": "all",
"enabled": false,
"position": 2,
"created_at": "2025-07-21T23:13:32.099-07:00",
"updated_at": "2025-07-21T23:13:32.099-07:00",
"destinations": [
{
"id": "aa38be11-6382-485f-a789-2bd8f3cd5241",
"target_type": "Group",
"target_id": "21ca5a29-2b03-4549-802e-dcdabb4863b4",
"created_at": "2025-07-21T23:13:32.104-07:00",
"updated_at": "2025-07-21T23:13:32.104-07:00"
}
],
"conditions": [
{
"id": "17189565-6453-4bc1-8321-59a1cd663a40",
"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-07-21T23:13:32.113-07:00",
"updated_at": "2025-07-21T23:13:32.113-07:00"
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "21ca5a29-2b03-4549-802e-dcdabb4863b4",
"type": "groups"
}
]
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
alert routing rule created
The response is of type object
.
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>",
"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": "f1fbd52a-7512-4f65-8ce1-5e1596e8550a",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "7894fd70-da73-45bc-b136-af11174b47e4",
"condition_type": "all",
"enabled": false,
"position": 2,
"created_at": "2025-07-21T23:13:32.099-07:00",
"updated_at": "2025-07-21T23:13:32.099-07:00",
"destinations": [
{
"id": "aa38be11-6382-485f-a789-2bd8f3cd5241",
"target_type": "Group",
"target_id": "21ca5a29-2b03-4549-802e-dcdabb4863b4",
"created_at": "2025-07-21T23:13:32.104-07:00",
"updated_at": "2025-07-21T23:13:32.104-07:00"
}
],
"conditions": [
{
"id": "17189565-6453-4bc1-8321-59a1cd663a40",
"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-07-21T23:13:32.113-07:00",
"updated_at": "2025-07-21T23:13:32.113-07:00"
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "21ca5a29-2b03-4549-802e-dcdabb4863b4",
"type": "groups"
}
]
}
}
}
}