DocuSign Connect webhooks: events, HMAC and best practices
DocuSign Connect sends webhooks as envelopes are sent, viewed, signed, completed, or declined. Capture them on a free webhooks.cc endpoint to see exactly what DocuSign sends, or fire realistic, correctly signed sample payloads at your own handler without touching a production account.
No credit card · 50 requests/day free · or get a guest URL without an account
Prefer a walkthrough? Read the local webhook testing guide.
DocuSign Connect webhook events
DocuSign Connect is DocuSign's webhook service. In the recommended JSON SIM format (Connect 2.0) every message carries an event string, a uri, retryCount, configurationId, apiVersion and generatedDateTime, and a data object holding accountId, envelopeId and whatever else the configuration subscribes to. These are the envelope and recipient events; the docs also list template, Workflow Builder, notary and other events.
| Event | When DocuSign sends it |
|---|---|
| envelope-created | An envelope is created in the DocuSign UI or its status is set to created through the API (JSON SIM only) |
| envelope-sent | The email with the envelope link goes to at least one recipient, or it is a recipient's turn in embedded signing |
| envelope-delivered | All recipients have opened the envelope on the DocuSign signing site (not an email delivery) |
| envelope-completed | All recipients have completed the envelope |
| envelope-declined | One of the recipients declined the envelope |
| envelope-voided | The sender voided the envelope or it expired; the void reason says which |
| envelope-resent | The envelope is resent in the UI or through the API (JSON SIM only) |
| envelope-corrected | The envelope is corrected in the UI or through the API (JSON SIM only) |
| envelope-reminder-sent | The automated reminders feature sends a reminder for the envelope (JSON SIM only) |
| envelope-discard | A created or draft envelope is deleted or discarded (JSON SIM only) |
| envelope-deleted | An envelope that was already sent is deleted (JSON SIM only) |
| envelope-purge | The envelope is queued to be purged (JSON SIM only) |
| envelope-removed | DocuSign permanently deletes an envelope after its retention period (JSON SIM only) |
| recipient-sent | The recipient is emailed that it is their turn to sign |
| recipient-delivered | The recipient has viewed the documents on the DocuSign signing site |
| recipient-completed | The recipient has completed their actions for the envelope, typically by signing |
| recipient-declined | The recipient declines to sign |
| recipient-authenticationfailed | The recipient fails an authentication check, after every allowed attempt |
| recipient-autoresponded | DocuSign is told that email delivery to the recipient failed, for example a bad address or an auto-reply |
| recipient-resent | The envelope is resent to a recipient (JSON SIM only) |
| recipient-reassign | A recipient reassigns the envelope (JSON SIM only) |
| recipient-delegate | A delegated signer is sent the envelope under a delegation rule (JSON SIM only) |
| recipient-finish-later | The recipient selects Finish Later (JSON SIM only) |
Source: DocuSign webhook event triggers.
DocuSign Connect HMAC signature
With Include HMAC Signature turned on for a Connect configuration, every message carries one signature header per HMAC key defined under Connect Keys. Header names are case-insensitive, so your framework may show them as x-docusign-signature-1.
| Detail | What DocuSign documents |
|---|---|
| Headers | X-DocuSign-Signature-1, X-DocuSign-Signature-2 and so on, one for each HMAC key on the account |
| Algorithm | HMAC with SHA-256, keyed with the HMAC secret key |
| Signed content | The entire body of the POST request as bytes, line endings included |
| Encoding | The hash is Base64-encoded |
| Passing rule | A hash computed with one of your keys must exactly match its header; one match is enough, and with no match the message should not be trusted |
| Comparison | Use a constant-time comparison, as for any HMAC |
| When it fails | Read the body with the right string encoding, and remove any double quote characters from the secret before computing |
How to test DocuSign webhooks
- 1
Create a webhook endpoint
Sign in free with GitHub, Google, or email to create a persistent endpoint, or grab an instant guest URL at webhooks.cc without an account.
- 2
Point DocuSign at your URL
Paste the endpoint URL into DocuSign: DocuSign Admin → Integrations → Connect → Add Configuration.
- 3
Inspect what arrives
Each delivery appears live in the dashboard with method, headers, body, query parameters, and source IP.
- 4
Forward to localhost or assert in CI
Run whk tunnel <port> to forward webhooks to a local server, or use the TypeScript, Python or Go SDK to wait for and assert on deliveries in tests.
DocuSign webhook signature
| Signature header | x-docusign-signature-1 |
|---|---|
| Algorithm | HMAC-SHA256 |
| Verification in webhooks.cc | Supported: add your hmac secret and every request is checked automatically |
Checking one request by hand? Paste its body and headers into the webhook signature checker, which has the DocuSign scheme built in and runs in your browser.
New to signature verification? Read the webhook signature verification guide.
Send sample DocuSign events
These DocuSign templates ship with realistic payloads and valid signature headers. Send them from the dashboard's Send button, the SDK, or your AI agent via MCP.
envelope-completedenvelope-declinedrecipient-completed# Send a signed DocuSign sample with the SDK
await client.endpoints.sendTemplate( slug, {
provider: "docusign",
template: "envelope-completed",
secret: "your-test-secret",
});Test your DocuSign webhook handler in CI
sendTo signs each request the way DocuSign does, with your test secret from DOCUSIGN_WEBHOOK_SECRET, and posts it straight to your handler, so its signature check stays on. The second test proves the handler rejects a forged signature. Drop the file into a Vitest suite that runs against your app; for Jest, delete the first line, since Jest provides the same globals.
import { describe, expect, it } from "vitest";
import { WebhooksCC } from "@webhooks-cc/sdk";
// Runs against your app on localhost. WHK_API_KEY and DOCUSIGN_WEBHOOK_SECRET come from the env.
const client = new WebhooksCC({ apiKey: process.env.WHK_API_KEY! });
const url = "http://localhost:3000/api/webhooks/docusign";
const send = (secret: string) =>
client.sendTo(url, {
provider: "docusign",
template: "envelope-completed",
secret,
});
describe("DocuSign webhook handler", () => {
it("accepts a signed envelope-completed", async () => {
const response = await send(process.env.DOCUSIGN_WEBHOOK_SECRET!);
expect(response.status).toBeGreaterThanOrEqual(200);
expect(response.status).toBeLessThan(300);
});
it("rejects a forged signature", async () => {
const response = await send("not-the-real-secret");
// A 4xx, not a crash: providers retry 5xx responses.
expect(response.status).toBeGreaterThanOrEqual(400);
expect(response.status).toBeLessThan(500);
});
});
Let your coding agent write and run it: the webhooks.cc agent skill teaches Claude Code, Cursor, and Codex to test webhook handlers with signed payloads. More patterns in the SDK testing docs.
Everything in one place
- Live dashboard: see deliveries the moment they arrive
- Forward to localhost with whk tunnel
- Replay any captured request to any URL
- Mock responses with custom status, headers, and body
- Forward to your servers, Slack or Discord
- TypeScript, Python and Go SDKs for CI assertions
- MCP server for AI coding agents
DocuSign webhook questions
DocuSign Connect is DocuSign's webhook service: when an event you subscribed to happens in an eSignature workflow, such as an envelope being sent or completed, Connect sends an HTTPS POST to your listener, a web service that must be reachable on the public internet. DocuSign recommends it over polling, which it limits to one status check per envelope every 15 minutes, and Connect messages do not count against API request limits.
Add a secret key under Connect Keys in DocuSign Admin and tick Include HMAC Signature on the Connect configuration. For each delivery, compute HMAC-SHA256 over the entire raw request body with that key, Base64-encode the result, and compare it in constant time with the X-DocuSign-Signature-1 header (X-DocuSign-Signature-2 for a second key, and so on). One match is enough. On webhooks.cc, add your first key to the endpoint and every captured delivery is marked valid or invalid against X-DocuSign-Signature-1.
An account can define up to one hundred HMAC keys, and each message gets one signature header per key, though DocuSign recommends using one key when possible. Removing a key shifts every key below it up a number, so key 3 becomes key 2 and the header numbers move with them. To rotate, DocuSign recommends stopping your app, deleting the old key, creating a new one, adding it to your app and starting it again. A key is shown in full only when it is created.
DocuSign's guidance: always answer with a 200, even for messages you do not need; respond within five seconds; queue each message and process it asynchronously rather than inside the request; keep the listener available 99% of the time or put a cloud queue in front of it; use the JSON SIM format; and do not include documents on every event, since most apps only need the final completed document. For production, DocuSign recommends securing messages with both HMAC and OAuth for Connect. Because a failed delivery is retried, make your handler idempotent, for example by keying on the envelopeId, event and generatedDateTime of each message.
When delivery of a message fails, Connect retries with exponential back-off: after five minutes, then 10, 20 and 40 minutes, then one hour, two hours and one day later, and then once a day for a 15-day span. JSON SIM messages carry a retryCount field.
An account-level Connect configuration, made in DocuSign Admin or through the API, notifies your listener about the subscribed events for every envelope in the account or for chosen users, including envelopes sent from the DocuSign web and mobile apps; it is only available on specific DocuSign plans. Envelope-level Connect is set per envelope by adding an eventNotification object when your app creates the envelope through the eSignature API, so each envelope can ask for different events and data; it is available on all plans. DocuSign offers HMAC for every Connect configuration type; for envelope-level messages, Connect must be enabled on the account.
Yes. Your listener can request DocuSign's client certificate during the TLS handshake and authorize it, in both XML and JSON modes. DocuSign notes that mutual TLS is often difficult to configure and must be updated when its certificate is renewed, about once a year, and recommends HMAC over mutual TLS for access control because HMAC also proves the message was not changed.
Create a free endpoint on webhooks.cc (sign in with GitHub, Google, or email, or use a guest endpoint without an account), then configure it as your webhook URL: DocuSign Admin → Integrations → Connect → Add Configuration. Every delivery shows up live in the dashboard with full headers, body, and query parameters. To hit a local server, run whk tunnel <port> and the CLI forwards each webhook to localhost.
Yes. webhooks.cc ships DocuSign templates (envelope-completed, envelope-declined, recipient-completed) with realistic payloads and correctly computed signature headers. Send them from the dashboard, the SDK, or the MCP server to exercise your handler end-to-end.
DocuSign signs each delivery with the x-docusign-signature-1 header using HMAC-SHA256. webhooks.cc verifies these signatures for you: add your hmac secret to the endpoint and every captured request is marked valid or invalid in the dashboard.
Yes. A free account gets you persistent endpoints, 50 requests per day, 7-day retention, and full CLI, SDK, and MCP access, with no credit card. You can also try a guest endpoint without an account: up to 25 requests for 12 hours.
More providers
Your DocuSign webhook URL is seconds away
Sign up free, create an endpoint, and point DocuSign at it.
No credit card · or try without an account