HTTP Webhook Router
NotificationIntermediateHook Type: notification
Uses the HTTP hook handler type (2026) to send JSON payloads to external URLs like Slack, Discord, or PagerDuty, receiving JSON responses back without local scripts.
webhookHTTPSlackDiscordintegration
Hook Code
// .claude/settings.json — HTTP Hook Configuration
{
"hooks": {
// Notify Slack when Claude completes a task
"Stop": [
{
"type": "http",
"url": "https://hooks.slack.com/services/T00/B00/xxx",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"body": {
"channel": "#dev-notifications",
"text": "Claude Code session completed: {{summary}}"
},
"timeout_ms": 5000
}
],
// Send tool usage to monitoring endpoint
"PostToolUse": [
{
"type": "http",
"url": "https://api.internal.com/claude-events",
"method": "POST",
"headers": {
"Authorization": "Bearer $MONITORING_TOKEN",
"Content-Type": "application/json"
},
"body": {
"event": "tool_use",
"tool": "{{tool_name}}",
"timestamp": "{{timestamp}}",
"session_id": "{{session_id}}"
}
}
],
// Block dangerous commands via external policy engine
"PreToolUse": [
{
"type": "http",
"url": "https://policy.internal.com/check",
"method": "POST",
"body": {
"tool": "{{tool_name}}",
"input": "{{tool_input}}"
}
// Response: { "allow": true/false, "reason": "..." }
}
]
}
}
// Benefits over shell hooks:
// - No local scripts to maintain
// - Works with any HTTP endpoint (Slack, Discord, PagerDuty, etc.)
// - JSON in → JSON out (structured, type-safe)
// - Built-in timeout and retry
// - Easy to audit and centralize
Add this hook to your Claude Code settings or .claude/settings.json to activate.
Terminal Preview
HTTP Webhook Router
About HTTP Webhook Router
Claude Code hooks let you run custom shell commands automatically in response to specific events during Claude's operation. HTTP Webhook Router is a Notification hook at the Intermediate level that automates tasks at key moments in your development workflow, reducing manual steps and enforcing consistency across your team.