Skip to content
TriedDocs
Webhooks

alert_test

Sent when you press Test on an alert rule, so you can check the rule's webhook and email recipients.

alert_test is a sample notification for one alert rule. It does not change the rule's state.

When it fires#

  • You press Test next to a rule in Alerting.
  • You call POST /alerts/:id/test.

Tried evaluates the rule's metric now, records a test entry in the alert history and sends the notification to the rule's emails and webhook.

Which settings enable it#

None. It uses the rule's webhook_url, else the workspace webhook URL. Workspace timeout, else 10 s. Up to 3 retries.

Payload#

{
  "event": "alert_test",
  "alert": {
    "alert_id": "alert_3a9e5c1f7b2d4e8a0c6f1b93",
    "name": "Success rate below 70%",
    "metric": "call_success_rate",
    "threshold_type": "absolute",
    "comparator": "<",
    "threshold": 70,
    "window_minutes": 60,
    "frequency_minutes": 5,
    "agent_ids": ["agent_5b0e2c7d9a1f4e3b8c6d2a10"],
    "emails": ["ops@bondidental.com.au"],
    "webhook_url": "https://example.com/hooks/alerts",
    "enabled": true,
    "state": "ok",
    "last_value": 81.25,
    "last_checked_timestamp": 1760686800000,
    "created_timestamp": 1760510400000,
    "value": 78.4,
    "message": "Test notification for \"Success rate below 70%\". Current call_success_rate: 78.4.",
    "timestamp": 1760687015220
  }
}

Fields#

The fields match alert_triggered, with:

Field Value
alert.state The rule's current state, unchanged by the test
alert.last_value, alert.last_checked_timestamp From the last real check, unchanged by the test
alert.value The metric's value right now
alert.message Test notification for "<name>". Current <metric>: <value>.

API response#

{
  "sent": true,
  "value": 78.4,
  "emails": ["ops@bondidental.com.au"],
  "webhook_url": "https://example.com/hooks/alerts"
}

webhook_url is the rule's own URL, or null when the rule falls back to the workspace URL. Check the delivery log for the webhook result.

How to respond#

Reply 2xx. Treat alert_test as a test in your handler: route it to the same channel as real alerts so you can see the formatting, but do not open an incident.