Test DocuSign Webhooks Locally (Receive DocuSign Webhooks on localhost)
Test DocuSign webhooks locally and receive them on localhost without deploying. Inspect the real payload, forward to your handler, and verify the signature.

You are building a DocuSign integration and you need to watch your handler react to a real event. The problem hits immediately: DocuSign will only POST to a public URL, and your handler is running on localhost:8080. DocuSign has no way to reach it.
The usual workarounds are slow. Deploying to a staging environment for every code change kills your iteration speed. Copying a sample payload out of the docs into curl gives you a guess at the real request, not the exact headers and body DocuSign actually sends. What you really want is to test DocuSign webhooks locally — real events, hitting your local handler, on a URL that does not change every time you restart.
This guide shows how to do exactly that.
Why testing DocuSign webhooks locally is tricky
A webhook is just an HTTP request that DocuSign sends to a URL when something changes. DocuSign lives on the public internet; your dev machine usually does not. It sits behind a router, a corporate firewall, or both, with no public IP and no inbound ports open.
So you need something in the middle: a public endpoint DocuSign can hit that relays each request down to your laptop without you opening a single firewall port. That is what Webhook Relay does — and unlike a random tunnel URL, the endpoint is stable, so you configure DocuSign once and never touch it again.
Step 1: Inspect the real payload with Webhook Bin
Before you write any handler code, find out what DocuSign actually sends. Open the free Webhook Bin — no signup — and you get an instant public URL.
- Copy the Webhook Bin URL.
- In DocuSign admin, go to Settings → Connect, add a Custom configuration, paste the URL, choose the envelope/recipient events, and enable HMAC.
- Trigger a real event and inspect the captured request.
You will see the full body and every header. DocuSign Connect can send JSON or XML (you choose). The JSON payload includes the event, the envelope status and recipient details. Pick JSON unless you have a reason to parse XML.
Now you know the exact shape of the data before writing a line of code. For more on this approach, see How to test webhooks and What is a webhook.
Step 2: Forward the events to localhost with the relay agent
Once you know the payload, route those same events into your local handler. Sign up for Webhook Relay, install the relay agent (CLI or Docker), and create a bucket — say docusign. The bucket gives you a stable public input endpoint.
Start forwarding to your local server:
relay forward --bucket docusign http://localhost:8080/webhook
The agent opens an outbound connection to Webhook Relay and streams every incoming request down to http://localhost:8080/webhook. Because the connection is outbound, there are no firewall ports to open and no public IP needed — this works from your laptop, behind a corporate proxy, or inside a Kubernetes cluster. Running in Docker? The same command works in the official webhookrelay/webhookrelayd image. Full details are in the localhost forwarding docs.
Now point the DocuSign webhook at your Webhook Relay endpoint (or create it there from the start), trigger an event, and watch it arrive on localhost.
DocuSign-specific configuration and quirks
A few DocuSign details worth knowing:
- Where to add it: Settings → Connect in DocuSign admin — add a Custom configuration with your URL.
- Enable HMAC: signing is opt-in. Turn on HMAC and store the key so you can verify deliveries.
- JSON or XML: Connect can POST either format — choose JSON for easier parsing.
- Events: envelope and recipient lifecycle events; subscribe only to the ones your flow needs.
Step 3: Verify the DocuSign webhook signature
DocuSign signs deliveries when you enable HMAC on the Connect configuration. It computes an HMAC-SHA256 of the raw request body using your Connect secret, base64-encodes it, and sends it in the X-DocuSign-Signature-1 header (additional numbered headers appear if you configure multiple keys for rotation). Recompute the HMAC over the raw body and compare against each provided signature header in constant time.
To sanity-check an HMAC implementation, paste a captured body, your secret, and the received signature into the free HMAC signature verifier. For language-specific code and the common pitfalls (reading the body after a JSON parser has already consumed it, timing-safe comparison), read Verify a webhook signature.
Replay and iterate
This is where local development gets fast:
- Replay from Webhook Relay — past requests are stored on your bucket, so you can resend a captured event against your handler without touching DocuSign at all.
- Iterate on your handler by editing code and replaying the same delivery until it behaves correctly. No commits, no pushes, no deploys just to test a single code path.
- Keep
relay forwardrunning while you work — events stream straight tolocalhostas you trigger them in DocuSign.
Because the Webhook Relay endpoint is stable, you can stop and restart the agent, reboot your machine, or come back next week — the DocuSign configuration never needs to change.
Get started
- Inspect the real payload in the free Webhook Bin — no signup needed.
- Create a Webhook Relay account, install the agent, and run
relay forward --bucket docusign http://localhost:8080/webhook. - Point your DocuSign webhook at the stable endpoint, trigger an event, and watch it hit
localhost.
You will be testing real DocuSign events against your local handler in a few minutes — no deploys, no open firewall ports, and a URL you configure exactly once.
