Integrations · Frameworks and SDKs

Validate emails of DocuSign recipients

Check an envelope's recipients before DocuSign sends it. One module with no dependencies, called by your own server right before it creates or sends an envelope through the eSignature REST API: it checks the address of every signer, carbon copy and other recipient, and tells you which ones cannot receive mail and where they sit in the envelope, so a mistyped address is fixed before the signing request bounces. It never changes the envelope and never calls DocuSign.

Download it: email-validation-docusign.zip holds email-validation-docusign.mjs (one JavaScript module) and the MIT licence.

What you need

  • An API key of ours from the API keys page with Validate addresses (on by default). Keep it on your server, never in a page.
  • Your server's code that builds envelopes, in anything with fetch (Node 22 or later, Bun, Deno, Cloudflare Workers). Copy email-validation-docusign.mjs next to it.
  • No DocuSign token: the module reads the envelope you are about to send and nothing else.

Before you send an envelope

Make the check once per process, not per envelope: it remembers answers between envelopes.

import { createDocuSignCheck } from './email-validation-docusign.mjs';

const ev = createDocuSignCheck({ apiKey: process.env.EV_API_KEY });

const envelope = {
  emailSubject: 'Please sign the agreement',
  status: 'sent',
  recipients: {
    signers: [{ email: customer.email, name: customer.name, recipientId: '1', routingOrder: '1' }],
    carbonCopies: [{ email: 'legal@acme.example', name: 'Legal', recipientId: '2', routingOrder: '2' }],
  },
  documents: [/* … */],
};

const report = await ev.checkEnvelope(envelope);
if (!report.ok) {
  // report.blocked: e.g. [{ where: 'recipients.signers[0].email', status: 'invalid', reason: 'no_mailbox',
  //   did_you_mean: null, … }]: ask for the address again instead of sending
} else {
  // create the envelope with DocuSign as you do today (POST …/v2.1/accounts/{accountId}/envelopes)
}

ev.checkEnvelope takes the envelope definition, the body you send to DocuSign's Envelopes: create call. Each entry of report.results holds a recipient's email, where, status, reason, action, did_you_mean, blocked and, when it got no answer, error. Saving a draft (status: 'created') and sending it later? Check it right before you change its status to sent.

What it checks

  • Every recipient type under recipients that has an email: signers, carbonCopies, certifiedDeliveries, agents, editors, intermediaries, witnesses, notaries, notaryWitnesses, participants and authorizedSignatories.
  • In-person signers by their signerEmail (or email in a notary flow). The host, hostEmail, is a user of your DocuSign account and is not checked. Seals have no address.
  • templateRoles when you send from a template (except an in-person role, whose email is its host's), and the recipients of each inline template in compositeTemplates.

The same address listed twice is checked once.

Try it free first

Check one of our free test addresses (on a domain that receives no mail) without sending anything:

const report = await ev.checkEnvelope({
  recipients: { signers: [{ email: 'no_mailbox@sandbox.email-validation.org', name: 'Test', recipientId: '1' }] },
});
console.log(report.ok, report.blocked); // false [ { where: 'recipients.signers[0].email', status: 'invalid', … } ]

Checks of our test addresses are free. Never send a real envelope to them, or to any address you made up: the signing request would bounce.

How it decides

  • What is blocked. invalid by default. block: ['invalid', 'disposable'] also blocks disposable addresses, and catch_all can be added too. valid and unknown are never blocked: act on the action of a valid result if you want to (spam traps and known complainers are valid with the action remove).
  • It fails open. A timeout (6 seconds per check by default, timeoutMs), a network error, a rate limit, no credits or any error answer leaves that recipient unchecked (error says why) and never blocks it. Nothing is retried; after a rate limit the module sends nothing until our API's Retry-After has passed. A missing apiKey throws when you make the check, so a setup mistake does not pass every envelope unchecked.
  • Answers are remembered. A verdict is kept for the process's life (10,000 addresses by default, memoMaxEntries), so the next envelope to the same person costs nothing; an unknown or a failed check is asked again.
  • Credits. Each check uses one credit (unknown results, malformed and sandbox addresses are free). region: 'eu' checks in the EU, at https://api-eu.email-validation.org.
  • Our key goes only to our API, redirects are never followed, and the module logs nothing.

Test it on a draft first

The module reads the envelope's fields by the names of DocuSign's eSignature REST API v2.1 reference and has not run against a real DocuSign account. An envelope built in another shape (an older API version, or an object whose fields are named differently) is not understood, and its recipients are then not checked. Run it on a draft envelope with the test address above before you rely on it.

More on DocuSign

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us