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": "448f0324-2316-4215-8725-bfb701b03660",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "61a37219ebbc984a51ee96ee4fc9a9d1bceb4cfb1dc29e34dc50ff5e789e3ec9",
      "alert_urgency_id": "ddcd8523-5c87-445a-b108-07185e7175db",
      "created_at": "2025-12-24T09:22:55.052-08:00",
      "updated_at": "2025-12-24T09:22:55.108-08:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "95182a29-cbd1-4ad4-9387-aafd966a272c",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "7c113901-e46c-4b0c-b1ff-6574b255c5a5",
          "alerts_source_id": "448f0324-2316-4215-8725-bfb701b03660",
          "created_at": "2025-12-24T09:22:55.109-08:00",
          "updated_at": "2025-12-24T09:22:55.109-08:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-12-24T09:22:55.056-08:00",
          "updated_at": "2025-12-24T09:22:55.056-08:00",
          "alert_field_id": "ec70f5c3-2767-4a9d-a9c1-10bebfd9a260",
          "alert_field": {
            "id": "ec70f5c3-2767-4a9d-a9c1-10bebfd9a260",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-12-24T09:22:52.923-08:00",
            "updated_at": "2025-12-24T09:22:52.923-08:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-12-24T09:22:55.058-08:00",
          "updated_at": "2025-12-24T09:22:55.058-08:00",
          "alert_field_id": "87ffdecd-1063-4a62-a72e-34d56fd2fbb4",
          "alert_field": {
            "id": "87ffdecd-1063-4a62-a72e-34d56fd2fbb4",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-12-24T09:22:52.920-08:00",
            "updated_at": "2025-12-24T09:22:52.920-08:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "1c989281-b982-481b-8215-64b34ecd4c40",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-12-24T09:22:55.037-08:00",
        "updated_at": "2025-12-24T09:22:55.037-08:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "95182a29-cbd1-4ad4-9387-aafd966a272c",
            "alert_urgency_id": "7c113901-e46c-4b0c-b1ff-6574b255c5a5",
            "alerts_source_id": "448f0324-2316-4215-8725-bfb701b03660",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-12-24T09:22:55.109-08:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-12-24T09:22:55.109-08:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "50cdff38-7880-4ad9-960e-26ccda55c98e",
            "alert_field_id": "ec70f5c3-2767-4a9d-a9c1-10bebfd9a260",
            "alerts_source_id": "448f0324-2316-4215-8725-bfb701b03660",
            "created_at": "2025-12-24T09:22:55.056-08:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-12-24T09:22:55.056-08:00"
          },
          {
            "id": "79ecf6d7-12a1-4c7d-822b-29e2f35bdd35",
            "alert_field_id": "87ffdecd-1063-4a62-a72e-34d56fd2fbb4",
            "alerts_source_id": "448f0324-2316-4215-8725-bfb701b03660",
            "created_at": "2025-12-24T09:22:55.058-08:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-12-24T09:22:55.058-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