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_json_path": "<string>",
        "identifier_value_regex": "<string>",
        "identifier_matchable_type": "AlertField",
        "identifier_matchable_id": "<string>",
        "identifier_reference_kind": "payload",
        "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": "04497c2f-3cdc-4bf7-bbfc-458585429db1",
    "type": "alert_sources",
    "attributes": {
      "name": "GW 2",
      "source_type": "generic_webhook",
      "status": "setup_incomplete",
      "secret": "37370178108d1db206daa93bcd1f206765dfdfddc87641b312c81f0cb84ff162",
      "alert_urgency_id": "52f2e9b8-ebec-4b0a-aac2-0ed777973538",
      "created_at": "2025-07-14T14:26:40.614-07:00",
      "updated_at": "2025-07-14T14:26:40.765-07:00",
      "webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
      "owner_group_ids": [],
      "alert_source_urgency_rules_attributes": [
        {
          "id": "a3c7f68c-b3fe-4436-8916-8797e5ab67f3",
          "json_path": "$.alert.status",
          "operator": "is",
          "value": "Critical",
          "alert_urgency_id": "1c262f98-15ec-427b-ad8c-4a9f62ce4031",
          "alerts_source_id": "04497c2f-3cdc-4bf7-bbfc-458585429db1",
          "created_at": "2025-07-14T14:26:40.766-07:00",
          "updated_at": "2025-07-14T14:26:40.766-07:00",
          "conditionable_type": null,
          "conditionable_id": null,
          "kind": "payload"
        }
      ],
      "alert_source_fields_attributes": [
        {
          "template_body": null,
          "created_at": "2025-07-14T14:26:40.618-07:00",
          "updated_at": "2025-07-14T14:26:40.618-07:00",
          "alert_field_id": "a8f1168c-4751-4790-81fb-2f47921d62c3",
          "alert_field": {
            "id": "a8f1168c-4751-4790-81fb-2f47921d62c3",
            "slug": "description-field",
            "name": "Description Field",
            "kind": "description",
            "created_at": "2025-07-14T14:26:35.863-07:00",
            "updated_at": "2025-07-14T14:26:35.863-07:00"
          }
        },
        {
          "template_body": null,
          "created_at": "2025-07-14T14:26:40.621-07:00",
          "updated_at": "2025-07-14T14:26:40.621-07:00",
          "alert_field_id": "f9e97c1e-7ccb-4d6c-9e2e-fce13135376b",
          "alert_field": {
            "id": "f9e97c1e-7ccb-4d6c-9e2e-fce13135376b",
            "slug": "title-field",
            "name": "Title Field",
            "kind": "title",
            "created_at": "2025-07-14T14:26:35.858-07:00",
            "updated_at": "2025-07-14T14:26:35.858-07:00"
          }
        }
      ],
      "sourceable_attributes": {
        "id": "4dfbb2a1-cd93-430c-9482-ab20c23b1335",
        "auto_resolve": false,
        "resolve_state": null,
        "created_at": "2025-07-14T14:26:40.598-07:00",
        "updated_at": "2025-07-14T14:26:40.598-07:00",
        "field_mappings_attributes": [],
        "field_mappings": []
      },
      "alert_template_attributes": null,
      "resolution_rule_attributes": null
    },
    "relationships": {
      "alert_source_urgency_rules": {
        "data": [
          {
            "id": "a3c7f68c-b3fe-4436-8916-8797e5ab67f3",
            "alerts_source_id": "04497c2f-3cdc-4bf7-bbfc-458585429db1",
            "alert_urgency_id": "1c262f98-15ec-427b-ad8c-4a9f62ce4031",
            "json_path": "$.alert.status",
            "operator": "is",
            "value": "Critical",
            "deleted_at": null,
            "created_at": "2025-07-14T14:26:40.766-07:00",
            "updated_at": "2025-07-14T14:26:40.766-07:00",
            "conditionable_type": null,
            "conditionable_id": null,
            "kind": "payload",
            "position": 1
          }
        ]
      },
      "alert_source_fields": {
        "data": [
          {
            "id": "aabe0f7b-d104-4883-8631-8879a4e47cb3",
            "template_body": null,
            "alerts_source_id": "04497c2f-3cdc-4bf7-bbfc-458585429db1",
            "alert_field_id": "a8f1168c-4751-4790-81fb-2f47921d62c3",
            "deleted_at": null,
            "created_at": "2025-07-14T14:26:40.618-07:00",
            "updated_at": "2025-07-14T14:26:40.618-07:00",
            "position": 1
          },
          {
            "id": "25ef0e59-4d7f-4208-b1db-068ac71e8502",
            "template_body": null,
            "alerts_source_id": "04497c2f-3cdc-4bf7-bbfc-458585429db1",
            "alert_field_id": "f9e97c1e-7ccb-4d6c-9e2e-fce13135376b",
            "deleted_at": null,
            "created_at": "2025-07-14T14:26:40.621-07:00",
            "updated_at": "2025-07-14T14:26:40.621-07:00",
            "position": 2
          }
        ]
      }
    }
  }
}

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

Response

200
application/vnd.api+json

alert source updated

The response is of type object.