POST
/
v1
/
alert_groups
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>"
          ]
        }
      ]
    }
  }
}'
{
  "data": {
    "id": "cb8c2e72-e0be-494d-9c47-acb3da441add",
    "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-06-19T02:16:32.075-07:00",
      "updated_at": "2025-06-19T02:16:32.075-07:00",
      "group_by_alert_title": false,
      "group_by_alert_urgency": false,
      "targets": [
        {
          "id": "731fbce4-cea8-4715-a639-0740ef7186a4",
          "target_type": "Service",
          "target_id": "e7a80444-e57d-4807-bd5d-096c5b29880b",
          "alert_group_id": "cb8c2e72-e0be-494d-9c47-acb3da441add",
          "deleted_at": null,
          "created_at": "2025-06-19T02:16:32.076-07:00",
          "updated_at": "2025-06-19T02:16:32.076-07:00"
        }
      ],
      "attributes": [],
      "conditions": [
        {
          "id": "f83769fa-35f3-47df-a16e-6da0a8226866",
          "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-06-19T02:16:32.077-07:00",
          "updated_at": "2025-06-19T02:16:32.077-07:00"
        },
        {
          "id": "d553b6a0-0161-4bc8-9524-16b06884ee69",
          "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-06-19T02:16:32.078-07:00",
          "updated_at": "2025-06-19T02:16:32.078-07:00",
          "values": [
            {
              "record_id": "1c86605a-9aef-4453-b463-b4e6308e11fd",
              "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.