---
title: "Download Signed Documents"
description: "Download the signed PDF when its deliverable.generated webhook arrives, verify the request, and save the file to your own storage by deliverable ID."
canonical: "https://signatureapi.com/docs/api/guides/use-cases/save-signed-documents"
source: "https://signatureapi.com/docs/api/guides/use-cases/save-signed-documents.md"
last_verified_api_version: "1.18.1"
last_modified: "2026-11-18T11:49:54Z"
---

# Download Signed Documents

Download the signed PDF when its deliverable.generated webhook arrives, verify the request, and save the file to your own storage by deliverable ID.

_Last verified against API version 1.18.1._

After all recipients have signed, SignatureAPI generates a deliverable: the signed documents, by default with an 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 has three parts:

1. SignatureAPI sends a `deliverable.generated` webhook event when the signed document is ready. The event includes a download URL.
2. Your server verifies the request, then downloads the PDF from the URL in the event.
3. Your server saves the file to your storage and responds with `200 OK`.

**Saving the signed documents when they are ready**

Participants: SignatureAPI, Your webhook endpoint, Your storage.

1. **SignatureAPI** to **Your webhook endpoint**: Webhook `deliverable.generated`
   The event's `data.url` is a download link for the signed PDF, valid for one hour.
2. **Your webhook endpoint**: Verify the signature
   Verify the raw body against the `webhook-*` headers before trusting `data.url`.
3. **Your webhook endpoint** to **SignatureAPI**: Download `GET data.url`
4. **SignatureAPI** to **Your webhook endpoint**: The signed PDF
5. **Your webhook endpoint** to **Your storage**: Save as `<deliverable id>.pdf`
   Name the file by `data.object_id` (the deliverable ID): one envelope can have several deliverables.
6. **Your webhook endpoint** to **SignatureAPI**: Respond `200 OK`
   Any status outside `2XX` counts as a failed delivery, and SignatureAPI sends the event again.

## 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](https://signatureapi.com/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
{
  "id": "evt_4GpGD1cNnrkemsTLAvPW9G",
  "type": "deliverable.generated",
  "timestamp": "2026-11-02T15:21:45.000Z",
  "data": {
    "object_id": "del_6FF89lKNyTNamOJCJd1tLL",
    "object_type": "deliverable",
    "envelope_id": "eb4cf433-a8af-4161-b37b-7ef57d423e56",
    "envelope_metadata": {
      "deal_id": "50055"
    },
    "deliverable_type": "standard",
    "deliverable_name": null,
    "included_documents": ["contract", "addendum"],
    "url": "https://vault.signatureapi.com/envelopes/eb4cf433-a8af-4161-b37b-7ef57d423e56/deliverables/del_6FF89lKNyTNamOJCJd1tLL/sealed.pdf?Signature=..."
  }
}
```

Key properties in `data`:

- `url`: A download link for the signed PDF. It expires after one hour.
- `object_id`: The deliverable ID. An envelope can have several deliverables, so use this ID, not the envelope ID, to name the file.
- `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

Verify the request first, against the raw body and the `webhook-*` headers, so a forged request can't make your server download and store a file. Then download the PDF from `data.url` and save it, named by deliverable ID. This example uses Express and the [Standard Webhooks](https://signatureapi.com/docs/api/guides/how-to/set-up-webhooks#verify-the-signature) library:

```javascript
import express from "express";
import { Webhook } from "standardwebhooks";

const app = express();
const wh = new Webhook(process.env.SIGNATUREAPI_WEBHOOK_SECRET);

app.post("/webhooks/signatureapi", express.raw({ type: "application/json" }), async (req, res) => {
  let event;
  try {
    // Verify the raw bytes; parse the JSON only after this succeeds
    event = wh.verify(req.body.toString("utf8"), {
      "webhook-id": req.header("webhook-id"),
      "webhook-timestamp": req.header("webhook-timestamp"),
      "webhook-signature": req.header("webhook-signature"),
    });
  } catch {
    return res.status(400).send("Invalid signature");
  }

  if (event.type === "deliverable.generated") {
    const pdfResponse = await fetch(event.data.url);
    if (!pdfResponse.ok) return res.status(500).send("Download failed"); // SignatureAPI retries the event
    const pdf = Buffer.from(await pdfResponse.arrayBuffer());

    // One file per deliverable: an envelope can have several
    await storage.save(`signed-documents/${event.data.envelope_id}/${event.data.object_id}.pdf`, pdf);
  }

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

`storage.save` stands for your own storage client, such as a cloud bucket or a file system. If the same event arrives twice, the second save overwrites the file with identical content.

> **Note:** The download URL in the event expires after one hour. If you need to download the file later, call the [Retrieve Deliverable](https://signatureapi.com/docs/api/resources/deliverables/get) endpoint to get a fresh link.

## Alternative: Retrieve the Deliverable via API

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

```http
GET /v1/deliverables/del_6FF89lKNyTNamOJCJd1tLL HTTP/1.1
Host: api.signatureapi.com
X-API-Key: YOUR_API_KEY
```

The response is the [deliverable object](https://signatureapi.com/docs/api/resources/deliverables/object), with a fresh `url` once its `status` is `generated`.

You can also list all deliverables for an envelope:

```http
GET /v1/envelopes/eb4cf433-a8af-4161-b37b-7ef57d423e56/deliverables HTTP/1.1
Host: api.signatureapi.com
X-API-Key: YOUR_API_KEY
```

## Keep Learning

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