Update a specific alert source by id
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": "2c2a6059-4723-4836-861a-11f45848b872",
"type": "alert_sources",
"attributes": {
"name": "GW 2",
"source_type": "generic_webhook",
"status": "setup_incomplete",
"secret": "7f71109381348cbf5cb89c6cbe182fa6ea66b6d31ee70c72dfee61fe0ab4f510",
"alert_urgency_id": "3842c9d6-50b4-435d-a7de-3a76139edfe2",
"created_at": "2025-08-21T23:40:56.093-07:00",
"updated_at": "2025-08-21T23:40:56.182-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [
{
"id": "bcce4036-656a-4973-8361-53135643e23c",
"json_path": "$.alert.status",
"operator": "is",
"value": "Critical",
"alert_urgency_id": "eeb4f491-1d13-49df-9379-da00548f7d07",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.183-07:00",
"updated_at": "2025-08-21T23:40:56.183-07:00",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-08-21T23:40:56.099-07:00",
"updated_at": "2025-08-21T23:40:56.099-07:00",
"alert_field_id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"alert_field": {
"id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-08-21T23:40:52.268-07:00",
"updated_at": "2025-08-21T23:40:52.268-07:00"
}
},
{
"template_body": null,
"created_at": "2025-08-21T23:40:56.103-07:00",
"updated_at": "2025-08-21T23:40:56.103-07:00",
"alert_field_id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"alert_field": {
"id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-08-21T23:40:52.263-07:00",
"updated_at": "2025-08-21T23:40:52.263-07:00"
}
}
],
"sourceable_attributes": {
"id": "edf981a4-a577-45ba-bc01-ad62555425f5",
"auto_resolve": false,
"resolve_state": null,
"created_at": "2025-08-21T23:40:56.073-07:00",
"updated_at": "2025-08-21T23:40:56.073-07:00",
"field_mappings_attributes": [],
"field_mappings": []
},
"alert_template_attributes": null,
"resolution_rule_attributes": null
},
"relationships": {
"alert_source_urgency_rules": {
"data": [
{
"id": "bcce4036-656a-4973-8361-53135643e23c",
"alert_urgency_id": "eeb4f491-1d13-49df-9379-da00548f7d07",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"conditionable_id": null,
"conditionable_type": null,
"created_at": "2025-08-21T23:40:56.183-07:00",
"deleted_at": null,
"json_path": "$.alert.status",
"kind": "payload",
"operator": "is",
"position": 1,
"updated_at": "2025-08-21T23:40:56.183-07:00",
"value": "Critical"
}
]
},
"alert_source_fields": {
"data": [
{
"id": "6b3d9d7f-629e-4a82-8b49-dfbbfd528aac",
"alert_field_id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.099-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-08-21T23:40:56.099-07:00"
},
{
"id": "37316221-5344-4b2b-833e-0f1fd3ab9866",
"alert_field_id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.103-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-08-21T23:40:56.103-07:00"
}
]
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
alert source updated
The response is of type object
.
Was this page helpful?
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": "2c2a6059-4723-4836-861a-11f45848b872",
"type": "alert_sources",
"attributes": {
"name": "GW 2",
"source_type": "generic_webhook",
"status": "setup_incomplete",
"secret": "7f71109381348cbf5cb89c6cbe182fa6ea66b6d31ee70c72dfee61fe0ab4f510",
"alert_urgency_id": "3842c9d6-50b4-435d-a7de-3a76139edfe2",
"created_at": "2025-08-21T23:40:56.093-07:00",
"updated_at": "2025-08-21T23:40:56.182-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [
{
"id": "bcce4036-656a-4973-8361-53135643e23c",
"json_path": "$.alert.status",
"operator": "is",
"value": "Critical",
"alert_urgency_id": "eeb4f491-1d13-49df-9379-da00548f7d07",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.183-07:00",
"updated_at": "2025-08-21T23:40:56.183-07:00",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-08-21T23:40:56.099-07:00",
"updated_at": "2025-08-21T23:40:56.099-07:00",
"alert_field_id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"alert_field": {
"id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-08-21T23:40:52.268-07:00",
"updated_at": "2025-08-21T23:40:52.268-07:00"
}
},
{
"template_body": null,
"created_at": "2025-08-21T23:40:56.103-07:00",
"updated_at": "2025-08-21T23:40:56.103-07:00",
"alert_field_id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"alert_field": {
"id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-08-21T23:40:52.263-07:00",
"updated_at": "2025-08-21T23:40:52.263-07:00"
}
}
],
"sourceable_attributes": {
"id": "edf981a4-a577-45ba-bc01-ad62555425f5",
"auto_resolve": false,
"resolve_state": null,
"created_at": "2025-08-21T23:40:56.073-07:00",
"updated_at": "2025-08-21T23:40:56.073-07:00",
"field_mappings_attributes": [],
"field_mappings": []
},
"alert_template_attributes": null,
"resolution_rule_attributes": null
},
"relationships": {
"alert_source_urgency_rules": {
"data": [
{
"id": "bcce4036-656a-4973-8361-53135643e23c",
"alert_urgency_id": "eeb4f491-1d13-49df-9379-da00548f7d07",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"conditionable_id": null,
"conditionable_type": null,
"created_at": "2025-08-21T23:40:56.183-07:00",
"deleted_at": null,
"json_path": "$.alert.status",
"kind": "payload",
"operator": "is",
"position": 1,
"updated_at": "2025-08-21T23:40:56.183-07:00",
"value": "Critical"
}
]
},
"alert_source_fields": {
"data": [
{
"id": "6b3d9d7f-629e-4a82-8b49-dfbbfd528aac",
"alert_field_id": "c1e33b27-a1c6-43c5-8c40-dde66eeb0528",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.099-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-08-21T23:40:56.099-07:00"
},
{
"id": "37316221-5344-4b2b-833e-0f1fd3ab9866",
"alert_field_id": "5b330911-c4a6-48d1-8357-d91c4a53d502",
"alerts_source_id": "2c2a6059-4723-4836-861a-11f45848b872",
"created_at": "2025-08-21T23:40:56.103-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-08-21T23:40:56.103-07:00"
}
]
}
}
}
}