Webhooks
Contents
Replay Vision is in closed beta
Not yet available to everyone – join the waitlist to get updates.
Replay Vision can deliver a scanner's digests and alerts to a webhook instead of, or alongside, Slack. When a digest or alert fires, PostHog sends an HTTP POST with a JSON body to the URL you set on the action.
Setting up a webhook
- Open a scanner and create or edit a digest or an alert.
- Under Delivery, choose Webhook.
- Paste the URL of the endpoint that should receive the payload.
- Save.
The action still appears on the scanner page and in its run history whether or not a webhook is set, so an unreachable endpoint never hides the result.
Request
- Method:
POST - Headers:
Content-Type: application/jsonX-PostHog-Webhook-Version: 1– the payload version. New fields may be added to the body without changing this, so ignore unknown fields rather than rejecting the payload. A breaking change would ship under a new version.
Payload
The body is a JSON envelope. type tells you what happened; data carries the report and links.
JSON
Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique ID for this delivery. Equal to data.run_id; use it to dedupe retries. |
type | string | One of replay_vision.digest, replay_vision.alert_fired, or replay_vision.alert_recovered. Route on this. |
timestamp | string | ISO 8601 time the run was scheduled. |
data.vision_action_id | string | ID of the digest or alert. |
data.run_id | string | ID of this specific run. |
data.scanner_id | string | null | ID of the scanner the action belongs to. |
data.action_name | string | Name of the digest or alert. |
data.scanner_name | string | null | Name of the scanner. |
data.observation_count | number | How many observations this run matched. |
data.report | string | The report as Markdown. |
data.run_url | string | Link to the run in PostHog, showing every matching observation. |
Event types
replay_vision.digest– a scheduled digest produced its summary.replay_vision.alert_fired– an alert's condition was met.replay_vision.alert_recovered– an alert that was firing has cleared.