Skip to main content
POST
/
v1
/
alert_groups
Creates an alert group
curl --request POST \
  --url https://api.rootly.com/v1/alert_groups \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "alert_groups",
    "attributes": {
      "name": "<string>",
      "description": "<string>",
      "time_window": 123,
      "targets": [
        {
          "target_type": "Group",
          "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        }
      ],
      "attributes": [
        {
          "json_path": "<string>"
        }
      ],
      "group_by_alert_title": 1,
      "group_by_alert_urgency": 1,
      "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>"
          ],
          "alert_urgency_ids": [
            "<string>"
          ],
          "conditionable_type": "AlertField",
          "conditionable_id": "<string>"
        }
      ]
    }
  }
}'
{
  "data": {
    "id": "104446ad-e1ac-4d8d-9e6c-2611bd11a4e5",
    "type": "alert_groups",
    "attributes": {
      "name": "Test alert group",
      "slug": "test-alert-group",
      "description": null,
      "time_window": 10,
      "condition_type": "any",
      "deleted_at": null,
      "created_at": "2025-10-28T12:12:44.022-07:00",
      "updated_at": "2025-10-28T12:12:44.022-07:00",
      "group_by_alert_title": false,
      "group_by_alert_urgency": false,
      "targets": [
        {
          "id": "b30c700b-6eb0-434c-b0d5-e289ecbdd7d7",
          "alert_group_id": "104446ad-e1ac-4d8d-9e6c-2611bd11a4e5",
          "created_at": "2025-10-28T12:12:44.023-07:00",
          "deleted_at": null,
          "target_id": "60f89b7b-8c5d-48dc-8c5c-a6656b9884d9",
          "target_type": "Service",
          "updated_at": "2025-10-28T12:12:44.023-07:00"
        }
      ],
      "attributes": [],
      "conditions": [
        {
          "id": "eb49fb03-2c97-47aa-b9ec-a35f114112f1",
          "property_field_condition_type": "is_one_of",
          "property_field_name": "description",
          "property_field_type": "attribute",
          "property_field_value": null,
          "property_field_values": [
            "Test description"
          ],
          "created_at": "2025-10-28T12:12:44.024-07:00",
          "updated_at": "2025-10-28T12:12:44.024-07:00",
          "conditionable_type": null,
          "conditionable_id": null
        },
        {
          "id": "52aa6fbe-b9f0-4993-9395-73e0d98c72f3",
          "property_field_condition_type": "is_one_of",
          "property_field_name": "alert_urgency",
          "property_field_type": "attribute",
          "property_field_value": null,
          "property_field_values": [],
          "created_at": "2025-10-28T12:12:44.026-07:00",
          "updated_at": "2025-10-28T12:12:44.026-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "values": [
            {
              "record_id": "71f748fa-54a4-4976-9923-e70104aa8366",
              "record_type": "AlertUrgency"
            }
          ]
        }
      ]
    }
  }
}

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

alert group created with conditions

data
object
required