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": "77417033-2202-484d-98ae-50232f27f38e",
    "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-07-25T14:30:03.543-07:00",
      "updated_at": "2025-07-25T14:30:03.543-07:00",
      "group_by_alert_title": false,
      "group_by_alert_urgency": false,
      "targets": [
        {
          "id": "88547fea-c941-4650-92a9-e6e238242900",
          "target_type": "Service",
          "target_id": "7d587ca6-4f51-4131-9a46-9fbfe0f1ea31",
          "alert_group_id": "77417033-2202-484d-98ae-50232f27f38e",
          "deleted_at": null,
          "created_at": "2025-07-25T14:30:03.545-07:00",
          "updated_at": "2025-07-25T14:30:03.545-07:00"
        }
      ],
      "attributes": [],
      "conditions": [
        {
          "id": "c13285e9-ae10-4cd4-b893-2944b910e61e",
          "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-07-25T14:30:03.546-07:00",
          "updated_at": "2025-07-25T14:30:03.546-07:00",
          "conditionable_type": null,
          "conditionable_id": null
        },
        {
          "id": "8dd9826b-1528-4302-9972-77f8329a6091",
          "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-07-25T14:30:03.547-07:00",
          "updated_at": "2025-07-25T14:30:03.547-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "values": [
            {
              "record_id": "a444ff07-f6ab-4c6a-a1bf-c4f184790727",
              "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

Response

201
application/vnd.api+json

alert group created with conditions

The response is of type object.