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": "cd32bbe8-00b6-476b-9e0e-d243e286e9a3",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "c3da77e48e49a4f9e73aa36458134b80e2f6ba35e46f7474480aed760545df27",
      "alert_urgency_id": "bebc2b71-8812-44ad-82dd-f66bf3b74037",
      "created_at": "2025-11-28T18:06:50.832-08:00",
      "updated_at": "2025-11-28T18:06:50.910-08:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "061ea474-eb9a-4fcb-a3ec-648759796915",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "dab4add6-c832-4f8e-94bf-dd5ee937a25a",
          "alerts_source_id": "cd32bbe8-00b6-476b-9e0e-d243e286e9a3",
          "created_at": "2025-11-28T18:06:50.911-08:00",
          "updated_at": "2025-11-28T18:06:50.911-08:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-11-28T18:06:50.836-08:00",
          "updated_at": "2025-11-28T18:06:50.836-08:00",
          "alert_field_id": "5255a42a-712d-4fac-a099-9561b0751ad0",
          "alert_field": {
            "id": "5255a42a-712d-4fac-a099-9561b0751ad0",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-11-28T18:06:47.487-08:00",
            "updated_at": "2025-11-28T18:06:47.487-08:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-11-28T18:06:50.839-08:00",
          "updated_at": "2025-11-28T18:06:50.839-08:00",
          "alert_field_id": "87d4e465-1848-466d-ab17-fd3d513c549d",
          "alert_field": {
            "id": "87d4e465-1848-466d-ab17-fd3d513c549d",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-11-28T18:06:47.482-08:00",
            "updated_at": "2025-11-28T18:06:47.482-08:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "a7d7ad73-cda5-4cc1-9bf0-dc68aae970bd",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-11-28T18:06:50.815-08:00",
        "updated_at": "2025-11-28T18:06:50.815-08:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "061ea474-eb9a-4fcb-a3ec-648759796915",
            "alert_urgency_id": "dab4add6-c832-4f8e-94bf-dd5ee937a25a",
            "alerts_source_id": "cd32bbe8-00b6-476b-9e0e-d243e286e9a3",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-11-28T18:06:50.911-08:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-11-28T18:06:50.911-08:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "c768b1da-0c37-4177-865a-c7831673d53a",
            "alert_field_id": "5255a42a-712d-4fac-a099-9561b0751ad0",
            "alerts_source_id": "cd32bbe8-00b6-476b-9e0e-d243e286e9a3",
            "created_at": "2025-11-28T18:06:50.836-08:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-11-28T18:06:50.836-08:00"
          },
          {
            "id": "971407cb-b9db-4010-aad8-bb746a25ea39",
            "alert_field_id": "87d4e465-1848-466d-ab17-fd3d513c549d",
            "alerts_source_id": "cd32bbe8-00b6-476b-9e0e-d243e286e9a3",
            "created_at": "2025-11-28T18:06:50.839-08:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-11-28T18:06:50.839-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