Update an alert
Updates the specified alert. Any parameters not provided are left unchanged.
Path Parameters
- Type: integerFormat: int32idrequired
The ID of the alert to update.
Body·
required
application/json
Update an alert
- Type: booleanactiverequired
Whether the alert is active.
- Type: array string[]eventsrequired
List of events that trigger the alert.
- Type: array integer[]automated
_test _ids Optional list of automated test IDs this alert should be scoped to.
- Type: stringenumchannel
Delivery channel for the alert.
values- S
L A C K - H
O O K _ U R L - A
L L
- Type: stringhook
_url HTTPS URL that receives a JSON POST when an event fires.
- Type: integerFormat: int32slack
_channel _id ID of a Slack channel previously connected to your project.
Responses
- application/json
- application/json
- application/json
Request Example for post/v1/alerts/{id}
curl http://api.mailreach.co/api/v1/alerts/42 \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_SECRET_TOKEN' \
--data '{
"active": true,
"channel": "SLACK",
"hook_url": "https://example.com/hooks/mailreach",
"slack_channel_id": 42,
"automated_test_ids": [
12,
34
],
"events": [
"ACCOUNT_DISCONNECTED"
]
}'
{
"id": 42,
"channel": "SLACK",
"events": [
"ACCOUNT_DISCONNECTED",
"SPAMCHECK_COMPLETED"
],
"active": true,
"hook_url": "https://example.com/hooks/mailreach",
"slack_channel_id": 42,
"automated_test_ids": [
12,
34
]
}