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": "cdf6aad4-a075-4954-a2e7-75e52a0bd9ae",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "8d06394b-e23b-442b-905d-ccc7a3c502d7",
"condition_type": "all",
"enabled": false,
"position": 2,
"created_at": "2025-07-17T12:05:22.626-07:00",
"updated_at": "2025-07-17T12:05:22.626-07:00",
"destinations": [
{
"id": "5d937382-215e-4084-9132-9c3907774e3a",
"target_type": "Group",
"target_id": "3b988a34-10c9-4121-8197-1d7359cd18f7",
"created_at": "2025-07-17T12:05:22.628-07:00",
"updated_at": "2025-07-17T12:05:22.628-07:00"
}
],
"conditions": [
{
"id": "aa20f450-1a4c-4524-b59e-a6dbbf4bea1a",
"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-17T12:05:22.635-07:00",
"updated_at": "2025-07-17T12:05:22.635-07:00"
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "3b988a34-10c9-4121-8197-1d7359cd18f7",
"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": "cdf6aad4-a075-4954-a2e7-75e52a0bd9ae",
"type": "alert_routing_rules",
"attributes": {
"name": "Test Alert Routing Rule 1",
"alerts_source_id": "8d06394b-e23b-442b-905d-ccc7a3c502d7",
"condition_type": "all",
"enabled": false,
"position": 2,
"created_at": "2025-07-17T12:05:22.626-07:00",
"updated_at": "2025-07-17T12:05:22.626-07:00",
"destinations": [
{
"id": "5d937382-215e-4084-9132-9c3907774e3a",
"target_type": "Group",
"target_id": "3b988a34-10c9-4121-8197-1d7359cd18f7",
"created_at": "2025-07-17T12:05:22.628-07:00",
"updated_at": "2025-07-17T12:05:22.628-07:00"
}
],
"conditions": [
{
"id": "aa20f450-1a4c-4524-b59e-a6dbbf4bea1a",
"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-17T12:05:22.635-07:00",
"updated_at": "2025-07-17T12:05:22.635-07:00"
}
]
},
"relationships": {
"owning_teams": {
"data": [
{
"id": "3b988a34-10c9-4121-8197-1d7359cd18f7",
"type": "groups"
}
]
}
}
}
}