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": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"type": "alert_sources",
"attributes": {
"name": "GW 2",
"source_type": "generic_webhook",
"status": "setup_incomplete",
"secret": "a041043a2d58a832ed8d81edd420c29902dc2b5899f2c80b37023ae5e2489e28",
"alert_urgency_id": "5d1b8fab-ea3e-4445-9d05-28b54ee421af",
"created_at": "2025-08-02T12:34:48.589-07:00",
"updated_at": "2025-08-02T12:34:48.675-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [
{
"id": "5c0b0320-1730-45a7-a431-2e1e409b1e1e",
"json_path": "$.alert.status",
"operator": "is",
"value": "Critical",
"alert_urgency_id": "20fa0e2f-65eb-402f-9fa9-0846c0ac8664",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.676-07:00",
"updated_at": "2025-08-02T12:34:48.676-07:00",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-08-02T12:34:48.593-07:00",
"updated_at": "2025-08-02T12:34:48.593-07:00",
"alert_field_id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"alert_field": {
"id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-08-02T12:34:45.163-07:00",
"updated_at": "2025-08-02T12:34:45.163-07:00"
}
},
{
"template_body": null,
"created_at": "2025-08-02T12:34:48.596-07:00",
"updated_at": "2025-08-02T12:34:48.596-07:00",
"alert_field_id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"alert_field": {
"id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-08-02T12:34:45.159-07:00",
"updated_at": "2025-08-02T12:34:45.159-07:00"
}
}
],
"sourceable_attributes": {
"id": "f0950ea6-145c-4b15-8dbf-860836363d49",
"auto_resolve": false,
"resolve_state": null,
"created_at": "2025-08-02T12:34:48.573-07:00",
"updated_at": "2025-08-02T12:34:48.573-07:00",
"field_mappings_attributes": [],
"field_mappings": []
},
"alert_template_attributes": null,
"resolution_rule_attributes": null
},
"relationships": {
"alert_source_urgency_rules": {
"data": [
{
"id": "5c0b0320-1730-45a7-a431-2e1e409b1e1e",
"alert_urgency_id": "20fa0e2f-65eb-402f-9fa9-0846c0ac8664",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"conditionable_id": null,
"conditionable_type": null,
"created_at": "2025-08-02T12:34:48.676-07:00",
"deleted_at": null,
"json_path": "$.alert.status",
"kind": "payload",
"operator": "is",
"position": 1,
"updated_at": "2025-08-02T12:34:48.676-07:00",
"value": "Critical"
}
]
},
"alert_source_fields": {
"data": [
{
"id": "a647ce5e-907b-4254-8bd4-e20b91abc956",
"alert_field_id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.593-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-08-02T12:34:48.593-07:00"
},
{
"id": "0e6deb72-a919-4428-9396-013dbcac9689",
"alert_field_id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.596-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-08-02T12:34:48.596-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": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"type": "alert_sources",
"attributes": {
"name": "GW 2",
"source_type": "generic_webhook",
"status": "setup_incomplete",
"secret": "a041043a2d58a832ed8d81edd420c29902dc2b5899f2c80b37023ae5e2489e28",
"alert_urgency_id": "5d1b8fab-ea3e-4445-9d05-28b54ee421af",
"created_at": "2025-08-02T12:34:48.589-07:00",
"updated_at": "2025-08-02T12:34:48.675-07:00",
"webhook_endpoint": "http://localhost:3001/webhooks/incoming/generic_webhooks/notify/<TYPE>/<ID>",
"owner_group_ids": [],
"alert_source_urgency_rules_attributes": [
{
"id": "5c0b0320-1730-45a7-a431-2e1e409b1e1e",
"json_path": "$.alert.status",
"operator": "is",
"value": "Critical",
"alert_urgency_id": "20fa0e2f-65eb-402f-9fa9-0846c0ac8664",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.676-07:00",
"updated_at": "2025-08-02T12:34:48.676-07:00",
"conditionable_type": null,
"conditionable_id": null,
"kind": "payload"
}
],
"alert_source_fields_attributes": [
{
"template_body": null,
"created_at": "2025-08-02T12:34:48.593-07:00",
"updated_at": "2025-08-02T12:34:48.593-07:00",
"alert_field_id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"alert_field": {
"id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"slug": "description-field",
"name": "Description Field",
"kind": "description",
"created_at": "2025-08-02T12:34:45.163-07:00",
"updated_at": "2025-08-02T12:34:45.163-07:00"
}
},
{
"template_body": null,
"created_at": "2025-08-02T12:34:48.596-07:00",
"updated_at": "2025-08-02T12:34:48.596-07:00",
"alert_field_id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"alert_field": {
"id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"slug": "title-field",
"name": "Title Field",
"kind": "title",
"created_at": "2025-08-02T12:34:45.159-07:00",
"updated_at": "2025-08-02T12:34:45.159-07:00"
}
}
],
"sourceable_attributes": {
"id": "f0950ea6-145c-4b15-8dbf-860836363d49",
"auto_resolve": false,
"resolve_state": null,
"created_at": "2025-08-02T12:34:48.573-07:00",
"updated_at": "2025-08-02T12:34:48.573-07:00",
"field_mappings_attributes": [],
"field_mappings": []
},
"alert_template_attributes": null,
"resolution_rule_attributes": null
},
"relationships": {
"alert_source_urgency_rules": {
"data": [
{
"id": "5c0b0320-1730-45a7-a431-2e1e409b1e1e",
"alert_urgency_id": "20fa0e2f-65eb-402f-9fa9-0846c0ac8664",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"conditionable_id": null,
"conditionable_type": null,
"created_at": "2025-08-02T12:34:48.676-07:00",
"deleted_at": null,
"json_path": "$.alert.status",
"kind": "payload",
"operator": "is",
"position": 1,
"updated_at": "2025-08-02T12:34:48.676-07:00",
"value": "Critical"
}
]
},
"alert_source_fields": {
"data": [
{
"id": "a647ce5e-907b-4254-8bd4-e20b91abc956",
"alert_field_id": "3d49d498-dd78-4691-b0af-1e3bdfb1f892",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.593-07:00",
"deleted_at": null,
"position": 1,
"template_body": null,
"updated_at": "2025-08-02T12:34:48.593-07:00"
},
{
"id": "0e6deb72-a919-4428-9396-013dbcac9689",
"alert_field_id": "ff4600e7-6144-4d57-9702-fdc0c7930f8c",
"alerts_source_id": "66a93602-e4f2-4ba6-b999-b7c4df836357",
"created_at": "2025-08-02T12:34:48.596-07:00",
"deleted_at": null,
"position": 2,
"template_body": null,
"updated_at": "2025-08-02T12:34:48.596-07:00"
}
]
}
}
}
}