register_webhook
Subscribe an HTTP endpoint to receive relayed events, enabling reactive integrations and real-time notifications for message, task, and agent activity.
Instructions
Subscribe an HTTP endpoint to relay events.
When to use: reactive integrations, Slack notifier, audit pipeline, dashboard refresher. For polling-style observation prefer get_standup or peek_inbox_version. For local UIs the bundled /dashboard already consumes the live event stream.
Behavior: stores the subscription + optional HMAC secret (encrypted at rest with the same keyring the message body uses, v2.1 Phase 4p). Each delivery POSTs the event JSON with X-Relay-Delivery-ID + X-Relay-Idempotency-Key headers and an X-Relay-Signature HMAC-SHA256 if a secret was registered. Outbound URLs are SSRF-validated against the cloud-metadata + private-IP blocklist (v1.10). Events: message.sent | message.broadcast | task.posted | task.accepted | task.completed | task.rejected | channel.message_posted | agent.unregistered | agent.spawned | '*'. Optional filter (agent name) narrows by sender/recipient.
Returns: { success: true, webhook_id, url, event, filter, has_secret: boolean, resolved_ips: string[], note }.
Errors: AUTH_FAILED (caller needs webhooks capability), URL_BLOCKED (SSRF target), INVALID_INPUT, RATE_LIMITED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTP(S) URL to POST events to | |
| event | Yes | Event to subscribe to, or '*' for all events | |
| filter | No | Optional agent name filter (only fire if from_agent or to_agent matches) | |
| secret | No | Optional secret for HMAC signature (sent in X-Relay-Signature header) | |
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. |