How it works
- You create one HMAC key in the DocuSign account that owns your integration key, and set it as the webhook secret on your Nango integration.
- Your app subscribes to events on your users’ accounts with
integratorManagedset, so DocuSign signs their events with your key. Your users never create or share HMAC keys. - When an event happens, Nango checks the signature, matches the event’s
data.accountIdto the connection’saccountId, and forwards the event to your app.
Setup
1. Get your Nango webhook URL
In the Nango dashboard, open your DocuSign integration and copy the Webhook URL.2. Create an HMAC key
In the production DocuSign account that owns your integration key, open Connect, go to the Connect Keys tab and click Add Secret Key. Copy the key right away: DocuSign only shows it in full once. HMAC keys can only be created in the DocuSign admin, not through the API. Production and developer accounts have separate keys: for testing, see the DocuSign (Sandbox) webhooks guide.3. Set the webhook secret on the integration
In the Nango dashboard, open your DocuSign integration settings and paste the key into Webhook secret.For agents
For agents
Set the key with update an integration, passing it as
credentials.webhook_secret with the integration’s existing OAuth credentials. A scoped Environment API key needs the environment:integrations:update scope:4. Subscribe to events
Subscribe with the user’s connection, either per envelope or for the whole account. Both needincludeHMAC and integratorManaged set to "true", the JSON format (restv2.1) and SIM delivery. DocuSign flags are strings.
Per envelope (no admin rights needed): add eventNotification when you create the envelope.
For agents
For agents
Both requests go through the Nango proxy with the user’s connection, so a scoped Environment API key needs the Per account:See DocuSign’s guides on HMAC for multiple accounts and creating a Connect configuration.
environment:proxy scope. The connection config holds the user’s accountId.Per envelope:Webhook payload
With JSON SIM, DocuSign sends the recipient event before the envelope event.
Connection matching
Nango matchesdata.accountId against the connection’s accountId. Nango saves it when the connection is created, from the user’s default DocuSign account. Events from another account the user belongs to do not match that connection.
If several connections share the same account, each receives the event. A verified event for an account with no connection is still forwarded, without a connection ID.
Signature verification
DocuSign sends oneX-DocuSign-Signature-N header per active HMAC key, each a base64 HMAC-SHA256 of the raw body. Nango accepts the event when any of them matches the integration’s webhook secret.
Handle the webhook
Once routed to a connection, you can:- Forward it to your app: Nango forwards the event to your webhook URL.
- Handle it in a webhook function: use
event(for exampleenvelope-completed) as the webhook subscription.
Supported events
Subscribe only to the events you need. For the full list, see DocuSign event triggers.
Rollback strategy
To stop events, delete the user’s Connect configuration, or stop addingeventNotification to new envelopes.
To rotate the key, add a new key in your DocuSign account, update the integration’s webhook secret, then delete the old key. DocuSign signs with every active key, so events keep verifying during the switch.