Skip to main content
PUT
/
v1
/
alert_sources
/
{id}
Update an alert source
curl --request PUT \
  --url https://api.rootly.com/v1/alert_sources/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "alert_sources",
    "attributes": {
      "name": "<string>",
      "source_type": "email",
      "alert_urgency_id": "<string>",
      "deduplicate_alerts_by_key": true,
      "deduplication_key_kind": "payload",
      "deduplication_key_path": "<string>",
      "deduplication_key_regexp": "<string>",
      "owner_group_ids": [
        "<string>"
      ],
      "alert_template_attributes": {
        "title": "<string>",
        "description": "<string>",
        "external_url": "<string>"
      },
      "alert_source_urgency_rules_attributes": [
        {
          "json_path": "<string>",
          "operator": "is",
          "value": "<string>",
          "conditionable_type": "AlertField",
          "conditionable_id": "<string>",
          "kind": "payload",
          "alert_urgency_id": "<string>"
        }
      ],
      "sourceable_attributes": {
        "auto_resolve": true,
        "resolve_state": "<string>",
        "accept_threaded_emails": true,
        "field_mappings_attributes": [
          {
            "field": "external_id",
            "json_path": "<string>"
          }
        ]
      },
      "resolution_rule_attributes": {
        "enabled": true,
        "condition_type": "all",
        "identifier_matchable_type": "AlertField",
        "identifier_matchable_id": "<string>",
        "identifier_reference_kind": "payload",
        "identifier_json_path": "<string>",
        "identifier_value_regex": "<string>",
        "conditions_attributes": [
          {
            "field": "<string>",
            "operator": "is",
            "value": "<string>",
            "conditionable_type": "AlertField",
            "conditionable_id": "<string>",
            "kind": "payload"
          }
        ]
      },
      "alert_source_fields_attributes": [
        {
          "alert_field_id": "<string>",
          "template_body": "<string>"
        }
      ]
    }
  }
}'
{
  "data": {
    "id": "47bbcc43-d8bd-4666-8176-04be54e3ca8b",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "fc08aed4e748a1679726a95080807faa5cc268eafb163b6b69feed9bf1c46bec",
      "alert_urgency_id": "61e74cf8-a753-4188-b9d0-335a1484122b",
      "created_at": "2025-10-06T09:25:25.247-07:00",
      "updated_at": "2025-10-06T09:25:25.327-07:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "94e340f4-ee7a-49d6-8ac8-db8993022d78",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "a98b32f3-8934-402e-8e23-8522b086794a",
          "alerts_source_id": "47bbcc43-d8bd-4666-8176-04be54e3ca8b",
          "created_at": "2025-10-06T09:25:25.328-07:00",
          "updated_at": "2025-10-06T09:25:25.328-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-10-06T09:25:25.252-07:00",
          "updated_at": "2025-10-06T09:25:25.252-07:00",
          "alert_field_id": "74b80f97-660f-417f-862d-903cafcd20f5",
          "alert_field": {
            "id": "74b80f97-660f-417f-862d-903cafcd20f5",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-10-06T09:25:21.761-07:00",
            "updated_at": "2025-10-06T09:25:21.761-07:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-10-06T09:25:25.256-07:00",
          "updated_at": "2025-10-06T09:25:25.256-07:00",
          "alert_field_id": "495c2bef-c30d-4e09-afdb-79f4172ef8f9",
          "alert_field": {
            "id": "495c2bef-c30d-4e09-afdb-79f4172ef8f9",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-10-06T09:25:21.755-07:00",
            "updated_at": "2025-10-06T09:25:21.755-07:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "84dd9789-db25-47a2-8c6c-6257cb49f56c",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-10-06T09:25:25.228-07:00",
        "updated_at": "2025-10-06T09:25:25.228-07:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "94e340f4-ee7a-49d6-8ac8-db8993022d78",
            "alert_urgency_id": "a98b32f3-8934-402e-8e23-8522b086794a",
            "alerts_source_id": "47bbcc43-d8bd-4666-8176-04be54e3ca8b",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-10-06T09:25:25.328-07:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-10-06T09:25:25.328-07:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "d9b4dc26-c304-424c-93b2-d84e6c4e57a7",
            "alert_field_id": "74b80f97-660f-417f-862d-903cafcd20f5",
            "alerts_source_id": "47bbcc43-d8bd-4666-8176-04be54e3ca8b",
            "created_at": "2025-10-06T09:25:25.252-07:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-10-06T09:25:25.252-07:00"
          },
          {
            "id": "24241a5b-8f93-4ad4-aac4-1198d1973bdb",
            "alert_field_id": "495c2bef-c30d-4e09-afdb-79f4172ef8f9",
            "alerts_source_id": "47bbcc43-d8bd-4666-8176-04be54e3ca8b",
            "created_at": "2025-10-06T09:25:25.256-07:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-10-06T09:25:25.256-07:00"
          }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/vnd.api+json
data
object
required

Response

alert source updated

data
object
required
I