Update an Alert
Update an alert (event subscription) with JSON Patch or by sending the full definition again through the Collate REST API or Python SDK.
PUT
PUT /v1/events/subscriptions
Update an Alert
Update an alert in one of two ways:- Send the full definition with
PUT /v1/events/subscriptions. Collate matches onname, so a request with an existing name replaces the alert’s configuration. This is the simplest option for managing alerts as code. - Patch individual fields with JSON Patch.
Body Parameters
string
required
Name that uniquely identifies the alert. A request with an existing name updates that alert.
string
required
Type of alert, for example
Observability, Notification, or ActivityFeed.string
Display name of the alert.
string
Description of the alert in Markdown format.
boolean
Whether the alert is enabled.
array
Source the alert listens to, for example
testCase. An alert has exactly one value.object
Filters and triggers that decide which events the alert acts on.
array
Where the alert sends notifications, for example a webhook, Slack, or email.
array
Owner references (users or teams) to assign to the alert.
Update with JSON Patch
- By ID:
PATCH /v1/events/subscriptions/{id} - By name:
PATCH /v1/events/subscriptions/name/{name}
Content-Type header to application/json-patch+json.
Replace {id} with the UUID of the alert.
PUT /v1/events/subscriptions
Notes
Keep these points in mind when you update an alert.- Delivery restart: after an update, Collate restarts the alert’s delivery process so the change takes effect for new events.
- Changing filters or triggers: to change
input(filters and triggers) ordestinations, send the full definition withPUT. This is more reliable than patching the nestedinputfield, because Collate rebuilds the expanded conditions from the full request. - Changing sources:
resourcescan hold several sources. When you change them, check that every filter and trigger ininputstill applies to the new sources. Otherwise the update fails with a400error. - Existing events: an update doesn’t replay past events.