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": "306807d9-975f-4114-a5e5-18cb0b52af6f",
    "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-08-15T07:09:45.975-07:00",
      "updated_at": "2025-08-15T07:09:45.975-07:00",
      "group_by_alert_title": false,
      "group_by_alert_urgency": false,
      "targets": [
        {
          "id": "18bbf654-7dba-4630-b947-d06b0da033d2",
          "alert_group_id": "306807d9-975f-4114-a5e5-18cb0b52af6f",
          "created_at": "2025-08-15T07:09:45.976-07:00",
          "deleted_at": null,
          "target_id": "f4074e02-c08c-4fff-b761-6dd01157a755",
          "target_type": "Service",
          "updated_at": "2025-08-15T07:09:45.976-07:00"
        }
      ],
      "attributes": [],
      "conditions": [
        {
          "id": "bf124cba-4038-4b9d-bb45-3661862ef33b",
          "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-08-15T07:09:45.977-07:00",
          "updated_at": "2025-08-15T07:09:45.977-07:00",
          "conditionable_type": null,
          "conditionable_id": null
        },
        {
          "id": "e6c0110e-77c6-4094-b03c-491b03242ad6",
          "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-08-15T07:09:45.978-07:00",
          "updated_at": "2025-08-15T07:09:45.978-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "values": [
            {
              "record_id": "26da53db-3ffc-4a17-b59a-55f6399e9495",
              "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.