Skip to main content

Webhook Configuration

UnfoldAI can send HTTP webhook notifications when high-priority proactive alerts are triggered. Use this to pipe critical alerts to Slack, Discord, PagerDuty, or any custom endpoint.

Setup

// settings.json
{
"unfoldai.proactive.webhookEnabled": true,
"unfoldai.proactive.webhookUrl": "https://your-endpoint.example.com/webhook"
}

When Webhooks Fire

Webhooks are sent only for high-priority proactive alerts. This includes critical drift events, major error episodes, and high-risk pre-commit signals. Low and medium priority alerts are not sent to webhooks.

Payload Format

{
"source": "unfoldai",
"version": "2.8.4",
"timestamp": "2026-02-28T12:00:00.000Z",
"trigger": "drift_detected",
"priority": "high",
"title": "Agent appears stuck",
"message": "Cursor has modified auth.ts 8 times in the last 5 minutes without progress.",
"metadata": {
"sessionId": "abc123",
"episodeId": "ep_456",
"agent": "cursor",
"riskLevel": "high",
"riskScore": 85
}
}

Integration Examples

Slack (Incoming Webhook)

  1. Create a Slack Incoming Webhook in your workspace settings
  2. Set unfoldai.proactive.webhookUrl to the Slack webhook URL
  3. Slack will display the raw JSON payload — for formatted messages, use a middleware service or Slack workflow

Discord

  1. Create a Discord webhook in your channel settings
  2. Set the webhook URL in UnfoldAI settings
  3. Discord renders the payload as an embed

Custom Endpoint

Point the webhook to any HTTP endpoint that accepts POST requests with a JSON body. The endpoint should return a 2xx status code to acknowledge receipt.

Availability

Webhook configuration is available on all plans, including Free.