Developers· 7 min read

12 webhook event types: follow every envelope in real time

Stop polling for status. SignYourDox pushes 12 event types to your server, from the moment an email goes out to the final signed PDF, each one signed so you know it came from us.

If your app needs to know when a contract is signed, you have two choices: ask SignYourDox every few minutes ("is it done yet?"), or let SignYourDox tell you the moment something happens. The second one is a webhook, and it is faster, cheaper and far less code.

SignYourDox has 12 webhook event types. Eleven of them describe what happens to an envelope and its recipients, and one is a test event you can trigger yourself while you build. This guide explains each one.

All 12 event types at a glance

EventWhen it firesHow often
recipient.sentThe invitation email was sent to a recipient, and again on every resend.Every time
recipient.deliveredA recipient opened the envelope for the first time.Once per recipient
recipient.viewedA recipient opened or viewed the envelope, including the first time.Every time
recipient.remindedA reminder email was sent to a recipient.Every time
recipient.signedA recipient finished signing.Once per signer
recipient.downloadedA recipient downloaded their signed copy.Every time
recipient.email_failedAn email to a recipient could not be sent.Every time
recipient.auth_failedSomeone opened a recipient's link with a missing or wrong access code.Every time
envelope.completedEveryone has signed. Includes links to the signed PDF and audit trail.Once
envelope.declinedA recipient declined to sign, with their reason.Once
envelope.expiredThe envelope passed its expiry date before it was completed.Once
webhook.testSent only when you ask for a test delivery to one endpoint.On request

How the events fit together

For an envelope with one signer, a typical run looks like this:

  1. recipient.sent: the email goes out.
  2. recipient.delivered and recipient.viewed: they open it.
  3. recipient.reminded: if they wait, a reminder goes out (and more views may follow).
  4. recipient.signed: they sign.
  5. envelope.completed: the signed PDF and completion certificate are ready.
  6. recipient.downloaded: if they download their copy.

With several signers you get one recipient.signed per signer, then a single envelope.completed after the last one. Every envelope ends with exactly one of envelope.completed, envelope.declined or envelope.expired, so those three are all you need to know an envelope is finished.

Events people often miss

recipient.email_failed

A mistyped address or a full mailbox means your signer never sees the document. This event tells you which email failed (invitation, reminder, signed copy, completion copy or status update), so you can fix the address and resend before the deal goes cold.

recipient.auth_failed

Fires when someone opens a recipient's link with a missing or wrong access code. The code they tried is never included. One or two are normal typos. A burst in a short time can mean someone is guessing, which is worth an alert.

envelope.completed

Sent once the signed documents and completion certificate have been generated, usually 5 to 15 seconds after the last signature. It includes links to download them, the full list of recipients with when they signed, and two SHA-256 hashes: one of the original file you uploaded and one of the signed PDF. Compare them after downloading to prove you have exactly the file the event describes.

What a webhook looks like

Every event has the same shape: an id, a type, when it happened and a data object with the envelope. The tags you set when creating the envelope come back too, so you can match the event to your own record without a lookup.

recipient.signed payload (shortened)
{
  "id": "6f0c2c3e-…",
  "type": "recipient.signed",
  "createdAt": "2026-12-03T10:42:11+05:30",
  "apiVersion": "2026-10-26",
  "data": {
    "envelopId": "e1f2a3b4-…",
    "envelopName": "Q3 Vendor Agreement",
    "status": "RECEIVED",
    "sourceType": "API_TOKEN",
    "tags": [{ "name": "externalId", "value": "vendor-4471" }],
    "recipient": {
      "email": "jane@example.com",
      "name": "Jane Doe",
      "recipientRole": "NEEDS_TO_SIGN",
      "status": "SIGN"
    }
  }
}

Verify every request

Your webhook URL is public, so anyone could post to it. Every delivery is signed with HMAC-SHA256 using a secret only you and SignYourDox know. Check the X-Sydx-Signature header before you trust anything in the body.

Node.js
import crypto from "node:crypto";

// rawBody: the request body exactly as received, before JSON.parse
function isFromSignYourDox(rawBody, headers, signingSecret) {
  const timestamp = headers["x-sydx-timestamp"];
  const signature = headers["x-sydx-signature"];

  // Reject old deliveries so a captured request can't be replayed
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;

  const expected = "v1=" + crypto
    .createHmac("sha256", signingSecret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");

  return expected.length === signature.length &&
    crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
}

Built to be reliable

  • Automatic retries. If your server is down or doesn't answer with a 2xx in time, the delivery is retried.
  • At-least-once delivery. An event can arrive twice, for example after a retry. Use the X-Sydx-Event-Id header to ignore duplicates.
  • Delivery log and redelivery. Every event is stored on our side. You can list past events, see each delivery attempt and redeliver any event on demand.
  • Order-independent. Events are delivered separately, so sort by createdAt rather than arrival time.

Set it up in three calls

  1. Choose the event types you want (subscribe only to what you need).
  2. Register your HTTPS URL and store the signing secret it returns. It is shown only once.
  3. Send a webhook.test event to check your server receives and verifies it.

Every registered endpoint receives every event type you subscribed to, for every envelope in your account, whether it was created through the API or in the web app. The full reference is in your account under Settings → API. New to the API? Start with Add e-signatures to your app in 3 API calls.