Build a webhook receiver
A signature-verified endpoint that rejects forged and replayed deliveries, deduplicates by event ID, and processes Dairo events asynchronously.
A webhook receiver is the endpoint Dairo calls when something happens on your account. A production receiver does four things on every delivery: verify the signature and timestamp, deduplicate by event ID, respond fast, and hand the work to a background job.
This page is a complete, deployable endpoint in Node, Python, and Go. Each one verifies deliveries exactly as Verify the signature describes: the signature covers the timestamp, the event ID, and the body, so a captured delivery cannot be replayed with a new timestamp or event ID.
Set up the subscription
Point a subscription at your endpoint and store the signing secret it returns.
The endpoint
The seen set above is in memory, so it forgets across restarts and doesn't deduplicate across instances. In production, record each processed event ID in a durable, shared store — a unique key in your database, or Redis — and keep it at least as long as you might receive a retry, redrive, or replay of that event.
Test it
Send a message to trigger events, then watch your endpoint receive them.
The send fires message.delivered once the receiving server accepts it. Send to one of your own inbox addresses to also see message.received. A forged, altered, or stale delivery gets a 401; a duplicate event ID is a no-op 200.
Next steps
- Webhooks — every event type, header, and payload.
- Build a support inbox agent — turn received events into automated replies.