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": "b2c78180-c25a-4e19-bea2-dd64bfce30f5",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "383a9d9f189ed7b2ca1b16db0714b66088c33ede78e9d34fffefb07b239b9806",
      "alert_urgency_id": "a15936f9-4662-40f7-a29f-19961905ad13",
      "created_at": "2025-12-10T16:20:03.869-08:00",
      "updated_at": "2025-12-10T16:20:03.970-08:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "e6dca92e-257a-4795-af4b-65ce50fd4164",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "33fcc120-9e17-4e07-811b-8cd0023b2fab",
          "alerts_source_id": "b2c78180-c25a-4e19-bea2-dd64bfce30f5",
          "created_at": "2025-12-10T16:20:03.972-08:00",
          "updated_at": "2025-12-10T16:20:03.972-08:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-12-10T16:20:03.875-08:00",
          "updated_at": "2025-12-10T16:20:03.875-08:00",
          "alert_field_id": "a9b9f313-7cfc-41c9-806a-9b1fd98d75e7",
          "alert_field": {
            "id": "a9b9f313-7cfc-41c9-806a-9b1fd98d75e7",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-12-10T16:20:00.562-08:00",
            "updated_at": "2025-12-10T16:20:00.562-08:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-12-10T16:20:03.879-08:00",
          "updated_at": "2025-12-10T16:20:03.879-08:00",
          "alert_field_id": "66737cdb-78a3-49c0-b435-9fe78bfa06a5",
          "alert_field": {
            "id": "66737cdb-78a3-49c0-b435-9fe78bfa06a5",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-12-10T16:20:00.555-08:00",
            "updated_at": "2025-12-10T16:20:00.555-08:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "1e793a3a-f1f7-4b5f-a49f-75fbdf8830bb",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-12-10T16:20:03.849-08:00",
        "updated_at": "2025-12-10T16:20:03.849-08:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "e6dca92e-257a-4795-af4b-65ce50fd4164",
            "alert_urgency_id": "33fcc120-9e17-4e07-811b-8cd0023b2fab",
            "alerts_source_id": "b2c78180-c25a-4e19-bea2-dd64bfce30f5",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-12-10T16:20:03.972-08:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-12-10T16:20:03.972-08:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "ec5ed32a-8eb0-4da5-945b-d1679fee8fd8",
            "alert_field_id": "a9b9f313-7cfc-41c9-806a-9b1fd98d75e7",
            "alerts_source_id": "b2c78180-c25a-4e19-bea2-dd64bfce30f5",
            "created_at": "2025-12-10T16:20:03.875-08:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-12-10T16:20:03.875-08:00"
          },
          {
            "id": "fba18914-17a4-4488-8936-3cab8ce9e2e9",
            "alert_field_id": "66737cdb-78a3-49c0-b435-9fe78bfa06a5",
            "alerts_source_id": "b2c78180-c25a-4e19-bea2-dd64bfce30f5",
            "created_at": "2025-12-10T16:20:03.879-08:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-12-10T16:20:03.879-08: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