1. Configure your webhook endpoint
Go to Settings → Webhooks in the dashboard athq.surge.app. Add the URL where you want to receive events. Surge sends all event types to a single endpoint (you filter by type in your handler).
Your endpoint must:
- Be publicly accessible over
https://(orhttp://, but HTTPS is strongly recommended) - Resolve to a public IP address
- Return a
2xxstatus code within the request timeout - Handle duplicate deliveries (Surge retries failed attempts, so your handler should be idempotent)
2. Verify the signature
Every webhook request includes awebhook-signature header. Verifying it confirms the request came from Surge and wasn’t tampered with in transit.
Surge signs requests using HMAC-SHA256 following the Standard Webhooks specification. Use the standardwebhooks library in Python, TypeScript, or Ruby, or compute the signature directly in any language.
Surge sets three headers on every request:
webhook-id, webhook-timestamp, and webhook-signature. The library handles them for you in Python / TypeScript / Ruby; you read them directly when computing the signature manually (Elixir example below).Where to find your webhook secret
Your signing secret is in Settings → Webhooks in the dashboard, next to your webhook endpoint URL.3. Handle events
A webhook event has this shape:type and dispatches:
Replay protection
The Standard Webhooks spec includes a timestamp in the signature payload. Surge rejects replays outside a tolerance window. If you’re testing with recorded payloads, make sure your test framework handles timestamp validation or disables it appropriately.
Older signature header
Next steps
Webhook events
Every event type, its payload shape, and when it fires.
Two-way messaging
Reply to inbound messages and keep conversation state in sync.
Signature validation
Reference for the Standard Webhooks signature scheme Surge uses.
Deprecation notices
Migrating from the older
surge-signature header.