> ## Documentation Index
> Fetch the complete documentation index at: https://signatureapi-daf4ee54.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Download Signed Documents

> Retrieve signed deliverable PDFs after an envelope completes using webhooks and the deliverables API

After all recipients have signed, SignatureAPI generates a deliverable containing the signed document with an embedded audit log. This guide shows how to detect when a deliverable is ready, download the signed PDF, and save it to your own storage.

## Overview

The flow works in three steps:

1. SignatureAPI sends a `deliverable.generated` webhook event when the signed document is ready. The event includes a pre-signed download URL.
2. Your server downloads the PDF from the URL in the event payload.
3. Your server saves the file to your storage.

## Step 1: Set Up a Webhook

Register a webhook endpoint in the [Dashboard](https://dashboard.signatureapi.com/settings/webhooks) and subscribe to the `deliverable.generated` event. See [Set Up Webhooks](/docs/api/guides/how-to/set-up-webhooks) for detailed instructions.

## Step 2: Handle the Webhook Event

When the deliverable is generated, SignatureAPI sends an event with the download URL included directly in the payload:

```json theme={null}
{
  "id": "evt_9k3ppxyQwkr2J0dlhrzCI3",
  "type": "deliverable.generated",
  "timestamp": "2026-03-04T15:05:00.000Z",
  "data": {
    "object_id": "del_LXRDwyTeJDVrWXmjwxsAGPq",
    "object_type": "deliverable",
    "envelope_id": "55072f0e-b919-4d69-89cd-e7e56af00530",
    "envelope_metadata": {
      "deal_id": "50055"
    },
    "deliverable_type": "standard",
    "deliverable_name": null,
    "included_documents": ["contract", "addendum"],
    "url": "https://vault.signatureapi.com/envelopes/55072f0e-b919-4d69-89cd-e7e56af00530/deliverables/del_LXRDwyTeJDVrWXmjwxsAGPq/sealed.pdf?Signature=..."
  }
}
```

Key properties in `data`:

* `url`: A pre-signed download link for the signed PDF. This URL expires after 1 hour.
* `deliverable_type`: The type of deliverable (`standard` or `simple`).
* `deliverable_name`: The custom name, if one was set when the deliverable was created.
* `included_documents`: The document keys included in this deliverable.
* `envelope_metadata`: The metadata you attached when creating the envelope.

## Step 3: Download and Save the PDF

Use the `url` from the event payload to download the PDF and save it to your storage. Here is a conceptual example:

```js theme={null}
app.post("/webhooks/signatureapi", async (req, res) => {
  const event = req.body;

  if (event.type === "deliverable.generated") {
    // Download the signed PDF directly from the event URL
    const pdfResponse = await fetch(event.data.url);
    const pdfBuffer = await pdfResponse.arrayBuffer();

    // Save to your storage (S3, Azure Blob, local filesystem, etc.)
    await storage.save(
      `signed-documents/${event.data.envelope_id}.pdf`,
      pdfBuffer
    );
  }

  res.status(200).send("OK");
});
```

<Note>
  The download URL in the event payload expires after 1 hour. If you need to download the file after the URL has expired, call the [Retrieve Deliverable](/docs/api/resources/deliverables/get) endpoint to get a fresh link.
</Note>

<Note>
  Always [verify the webhook signature](/docs/api/guides/how-to/set-up-webhooks#verify-the-signature) before processing events in production.
</Note>

## Alternative: Retrieve the Deliverable via API

If you prefer to fetch deliverables without relying on the webhook URL, you can call the deliverables endpoint with the deliverable ID from the event:

```json theme={null}
// GET https://api.signatureapi.com/v1/deliverables/del_LXRDwyTeJDVrWXmjwxsAGPq
// X-API-Key: key_test_...
```

```json theme={null}
// HTTP Status Code 200

{
  "id": "del_LXRDwyTeJDVrWXmjwxsAGPq",
  "envelope_id": "55072f0e-b919-4d69-89cd-e7e56af00530",
  "type": "standard",
  "status": "generated",
  "url": "https://vault.signatureapi.com/envelopes/55072f0e-b919-4d69-89cd-e7e56af00530/deliverables/del_LXRDwyTeJDVrWXmjwxsAGPq...",
  //...
}
```

You can also list all deliverables for an envelope:

```json theme={null}
// GET https://api.signatureapi.com/v1/envelopes/55072f0e-b919-4d69-89cd-e7e56af00530/deliverables
// X-API-Key: key_test_...
```

## Try It

[Try this example in Postman](/docs/api/postman) using your [test API key](/docs/api/test-mode) to create a free, non-binding test envelope. Test envelopes won't send emails, but you can review them in your dashboard.

## Keep Learning

* Learn about [deliverable types](/docs/api/resources/deliverables/object), including standard and simple formats.
* Set up [webhooks](/docs/api/guides/how-to/set-up-webhooks) to automate your document processing pipeline.
* [Store envelope data](/docs/api/guides/use-cases/store-data-webhook) alongside the signed document for a complete record.
* Protect deliverables with a [password](/docs/api/resources/deliverables/password).
