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>",
      "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": "00d16cbc-1b3f-4efa-9b1e-aedd9a9058a3",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "3d760431270f169d7dd67fb52dbc967e07c9fadec0f20750e7d16f37d9b0d3b0",
      "alert_urgency_id": "2295e7b9-2533-4132-80c1-7dffcddceb19",
      "created_at": "2025-09-15T14:56:40.359-07:00",
      "updated_at": "2025-09-15T14:56:40.479-07:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "3892fb3d-c474-4603-b2d8-d926c709e3d3",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "35a0c20c-116e-444e-acb2-51c3a00cf760",
          "alerts_source_id": "00d16cbc-1b3f-4efa-9b1e-aedd9a9058a3",
          "created_at": "2025-09-15T14:56:40.481-07:00",
          "updated_at": "2025-09-15T14:56:40.481-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-09-15T14:56:40.368-07:00",
          "updated_at": "2025-09-15T14:56:40.368-07:00",
          "alert_field_id": "7bdd4038-edc6-4c2b-8ae1-5e83c27c4ad2",
          "alert_field": {
            "id": "7bdd4038-edc6-4c2b-8ae1-5e83c27c4ad2",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-09-15T14:56:36.429-07:00",
            "updated_at": "2025-09-15T14:56:36.429-07:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-09-15T14:56:40.374-07:00",
          "updated_at": "2025-09-15T14:56:40.374-07:00",
          "alert_field_id": "e3dbb7fe-4625-421c-86a2-ffd0bcd51f1a",
          "alert_field": {
            "id": "e3dbb7fe-4625-421c-86a2-ffd0bcd51f1a",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-09-15T14:56:36.424-07:00",
            "updated_at": "2025-09-15T14:56:36.424-07:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "04879c1e-cae8-4c55-a411-52541d564782",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-09-15T14:56:40.334-07:00",
        "updated_at": "2025-09-15T14:56:40.334-07:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "3892fb3d-c474-4603-b2d8-d926c709e3d3",
            "alert_urgency_id": "35a0c20c-116e-444e-acb2-51c3a00cf760",
            "alerts_source_id": "00d16cbc-1b3f-4efa-9b1e-aedd9a9058a3",
            "conditionable_id": null,
            "conditionable_type": null,
            "created_at": "2025-09-15T14:56:40.481-07:00",
            "deleted_at": null,
            "json_path": "$.alert.status",
            "kind": "payload",
            "operator": "is",
            "position": 1,
            "updated_at": "2025-09-15T14:56:40.481-07:00",
            "value": "Critical"
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "5384952e-b61e-45dd-825a-ea41332493e8",
            "alert_field_id": "7bdd4038-edc6-4c2b-8ae1-5e83c27c4ad2",
            "alerts_source_id": "00d16cbc-1b3f-4efa-9b1e-aedd9a9058a3",
            "created_at": "2025-09-15T14:56:40.368-07:00",
            "deleted_at": null,
            "position": 1,
            "template_body": null,
            "updated_at": "2025-09-15T14:56:40.368-07:00"
          },
          {
            "id": "54fc4389-5aba-4975-b4e0-0646240cd4b8",
            "alert_field_id": "e3dbb7fe-4625-421c-86a2-ffd0bcd51f1a",
            "alerts_source_id": "00d16cbc-1b3f-4efa-9b1e-aedd9a9058a3",
            "created_at": "2025-09-15T14:56:40.374-07:00",
            "deleted_at": null,
            "position": 2,
            "template_body": null,
            "updated_at": "2025-09-15T14:56:40.374-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