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": "f6ceef01-85d4-4c27-b10d-6efe50a69abd",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "0c3d4f8c79a93f791cb65b504e4b5ac5cdc9478689a898f35c65a9bd8328a516",
      "alert_urgency_id": "c3cc6e38-215b-463b-a9ca-6ae802a34415",
      "created_at": "2025-11-27T00:05:31.488-08:00",
      "updated_at": "2025-11-27T00:05:31.566-08:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "b95e2661-0c77-49fb-9693-1c6acb71c73f",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "79abe6d7-afbf-4fe4-a39f-9e4217b2b9da",
          "alerts_source_id": "f6ceef01-85d4-4c27-b10d-6efe50a69abd",
          "created_at": "2025-11-27T00:05:31.567-08:00",
          "updated_at": "2025-11-27T00:05:31.567-08:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-11-27T00:05:31.494-08:00",
          "updated_at": "2025-11-27T00:05:31.494-08:00",
          "alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
          "alert_field": {
            "id": "4591a238-64fc-41a9-84f8-10b5382f4995",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-11-27T00:05:28.713-08:00",
            "updated_at": "2025-11-27T00:05:28.713-08:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-11-27T00:05:31.498-08:00",
          "updated_at": "2025-11-27T00:05:31.498-08:00",
          "alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
          "alert_field": {
            "id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-11-27T00:05:28.707-08:00",
            "updated_at": "2025-11-27T00:05:28.707-08:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "43a2ff68-4130-4bb2-9d3c-672683c25a13",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-11-27T00:05:31.468-08:00",
        "updated_at": "2025-11-27T00:05:31.468-08:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "b95e2661-0c77-49fb-9693-1c6acb71c73f",
            "alert_urgency_id": "79abe6d7-afbf-4fe4-a39f-9e4217b2b9da",
            "alerts_source_id": "f6ceef01-85d4-4c27-b10d-6efe50a69abd",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-11-27T00:05:31.567-08:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-11-27T00:05:31.567-08:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "82d3e874-6db0-4b34-af41-df483d4cb20c",
            "alert_field_id": "4591a238-64fc-41a9-84f8-10b5382f4995",
            "alerts_source_id": "f6ceef01-85d4-4c27-b10d-6efe50a69abd",
            "created_at": "2025-11-27T00:05:31.494-08:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-11-27T00:05:31.494-08:00"
          },
          {
            "id": "6d01066e-fb8e-4d5c-9550-b328b1f27bb4",
            "alert_field_id": "ad90ab10-58e4-4edf-8e04-f5e9256c3c97",
            "alerts_source_id": "f6ceef01-85d4-4c27-b10d-6efe50a69abd",
            "created_at": "2025-11-27T00:05:31.498-08:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-11-27T00:05:31.498-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