---
title: "Download Document API Guide for eSign Workflows | BoldSign"
description: "Use the BoldSign Download Document API to retrieve signed PDFs after signing completes. Covers webhook timing, onBehalfOf, and saving the stream (cURL + SDKs)."
url: "https://boldsign.com/blogs/how-to-download-an-esigned-document-via-api/"
---

1. [Blog](https://boldsign.com/blogs.md)
2. [API](https://boldsign.com/category/api.md)

# Download an eSigned Document via API

[Gopinath Kannusamy](https://boldsign.com/author/gopinath-kannusamy/) April 16, 2024 Updated August 21, 2026 3 min read

Whether you’re initiating a transaction, appending your signature, or simply monitoring the progress as a CC’d recipient, accessing your finalized documents should be seamless and hassle-free. Today, we’ll explore how to download an eSignature document using BoldSign’s API. Let’s get started.

## Initiating Document Download Using BoldSign API

The first step in downloading an eSignature document via the BoldSign API is to initiate the download request. This requires the document ID of the specific document you wish to download. BoldSign supports both REST API endpoints and SDKs, so you can download documents as needed. For complete details on the download endpoint and response handling, refer to the official [BoldSign Download Document API](https://developers.boldsign.com/documents/download-document/) documentation.

> **Note:** When the document is created on behalf of a particular sender email, then the download operation can be performed by specifying the same sender identity email in the **onBehalfOf** parameter.

Since document signing is asynchronous, listen for the Completed webhook event before attempting to download to ensure the document is ready. Refer to the [Webhooks](https://developers.boldsign.com/webhooks/introduction/) documentation and the [Verify Webhook Events](https://developers.boldsign.com/webhooks/verify-webhook-events/) guide for setup and security best practices.

Let’s look at how to initiate the download process using different programming languages.

## Example Code for Downloading a Document

Here’s an example code snippet of how you can download a document via the BoldSign API and SDKs in various programming languages.

> **Note:** The second argument in the downloadDocument API is onBehalfOf. Use this argument only when the document was created on behalf of another sender identity. Replace **<senderidentityemail@example.com>** with the actual **sender identity email**.

```
# onBehalfOf (optional): provide the sender identity email only if the document was created on behalf of another sender identity
curl -X GET \
  'https://api.boldsign.com/v1/document/download?documentId={YOUR_DOCUMENT_ID}&onBehalfOf=senderidentityemail@example.com' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {YOUR_API_KEY}'
```

```
var apiClient = new ApiClient("https://api.boldsign.com", "YOUR_API_KEY");

var documentClient = new DocumentClient(apiClient);
// onBehalfOf: senderidentityemail@example.com (optional; use only if the document was created on behalf of another sender identity)
var documentStream = documentClient.DownloadDocument("YOUR_DOCUMENT_ID", "senderidentityemail@example.com");
```

```
import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    document_api = boldsign.DocumentApi(api_client)
    # on_behalf_of (optional): provide the sender identity email only if the document was created on behalf of another sender identity
    document_stream = document_api.download_document(
        document_id="YOUR_DOCUMENT_ID", on_behalf_of="senderidentityemail@example.com"
    )
```

```
<?php
require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;

$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);
// on_behalf_of (optional): provide the sender identity email only if the document was created on behalf of another sender identity
$document_stream = $document_api->downloadDocument($document_id = 'YOUR_DOCUMENT_ID', $on_behalf_of = 'senderidentityemail@example.com');
```

```
ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");

DocumentApi documentApi = new DocumentApi(client);
// onBehalfOf: senderidentityemail@example.com (optional; use only if the document was created on behalf of another sender identity)
File documentStream = documentApi.downloadDocument("YOUR_DOCUMENT_ID", "senderidentityemail@example.com");
```

```
import { DocumentApi } from "boldsign";

async function main() {
  const documentApi = new DocumentApi();
  documentApi.setApiKey("YOUR_API_KEY");

  // onBehalfOf: senderidentityemail@example.com (optional; use only if the document was created on behalf of another sender identity)
  const documentStream = await documentApi.downloadDocument(
    "YOUR_DOCUMENT_ID",
    "senderidentityemail@example.com",
  );
}

main();
```

If you want to test the document download API quickly without any manual setup, you can use the [Postman Document Download](https://www.postman.com/boldsign/boldsign-s-public-workspace/request/fmutc7u/document-download?sideView=agentMode) request available in the BoldSign Public Workspace.

## Handling the Document Stream

After you’ve initiated the document download request, BoldSign’s API returns the document stream, which contains the eSignature document. You can then process the document stream depending on your application’s requirements. For instance, you may choose to save the document to a local file system, integrate it into another system, or display it to the user for further action.

## Conclusion

In conclusion, downloading eSignature documents via the [BoldSign API](https://boldsign.com/esignature-api.md) is convenient. By leveraging BoldSign’s API, you can seamlessly integrate document retrieval capabilities into your applications, streamlining workflow processes and enhancing the user experience. If you prefer using the BoldSign web app, you can download documents directly from BoldSign. Refer to [BoldSign signed document download](https://support.boldsign.com/kb/article/122/download-signed-documents) guide for downloading signed documents in the BoldSign web app.

Whether you’re a developer looking to integrate eSignature functionalities or a business seeking to streamline document handling, BoldSign’s API provides the necessary tools and resources to achieve your goals. Refer to the [BoldSign API documentation](https://developers.boldsign.com/api-overview/getting-started/?region=us) to get started with integrating BoldSign APIs into your application.

Begin your [30-day, free BoldSign trial](https://account.boldsign.com/signup?planId=1018\&utm_source=boldsignblogs\&utm_medium=redirect\&utm_campaign=boldsign) today to see the full potential of BoldSign. We highly value your feedback, so please share your thoughts with us in the comments section. For any inquiries or to explore our services further, don’t hesitate to [schedule a demo](https://boldsign.com/request-demo.md) or reach out to our dedicated support team through our [support portal](https://support.boldsign.com/support/tickets/create). We’re here to assist you every step of the way.

Topics [API integration](https://boldsign.com/blogs/tag/api-integration.md)

## Sign documents 3x faster

Send, sign and manage documents securely and efficiently.

[Try it today](https://account.boldsign.com/signup?planId=1018\&utm_source=boldsignblogs\&utm_medium=redirect\&utm_campaign=boldsign)

## Gopinath Kannusamy

Gopinath is a passionate software developer with 2 years of experience at BoldSign. He is an avid writer and enjoys sharing his insights on technology and development. In his free time, he enjoys exploring new technologies and learning new things. Connect with him on [LinkedIn](https://www.linkedin.com/in/gopinath-kannusamy-b7b84517a/).

[More posts by Gopinath Kannusamy](https://boldsign.com/author/gopinath-kannusamy/)

## Related posts

- [API](https://boldsign.com/category/api.md) September 29, 2026 10 min read

  ## [How to Migrate from Docusign Without Losing Templates or Workflow Continuity](https://boldsign.com/blogs/migrate-from-docusign.md)

  Learn how to migrate from Docusign while protecting templates, signed records, and active workflows. Explore key risks, a practical checklist, and next steps.

- [API](https://boldsign.com/category/api.md) September 25, 2026 10 min read

  ## [Build vs Buy an eSignature API: What Should You Choose?](https://boldsign.com/blogs/build-vs-buy-esignature-api-guide.md)

  Compare the real cost, compliance risk, launch speed, and maintenance burden of building vs buying an eSignature API before you commit.

- [API](https://boldsign.com/category/api.md) September 22, 2026 9 min read

  ## [What Are the Common Challenges When Using Signature APIs in Software Development](https://boldsign.com/blogs/common-signature-api-challenges.md)

  Explore the common challenges developers face with a Signature API, from authentication issues to PDF rendering, webhooks, templates, and rate limits.

Get started

## Sign up for your free trial today!

[Start free trial](https://account.boldsign.com/signup?planId=1018)

- 30-day free trial
- No credit card required

*Picture: A completed employment contract: signed by John Doe on 11/03/2026, all parties have signed*
