# List download

URL: https://docs.hanzo.ai/docs/openapi/esign/get-esign-documents-by-id-download

> Returns the document — the sealed PDF once it is complete.

`GET /v1/esign/documents/{id}/download`

> [eSign →](https://docs.hanzo.ai/docs/openapi/esign) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                         |
| ------------- | ------------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/esign/documents/{id}/download` |
| **Method**    | `GET`                                                   |
| **Operation** | `get_esign_documents_by_id_download`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                  |

Returns the document — the sealed PDF once it is complete.

It answers the document's current PDF as base64 with a sealed flag and a
filename. Before completion that is the original upload; once every signer has
finished it is the SEALED artifact, with the field values rendered onto the page
and a real x509 PKCS#7 digital signature applied. There is one pdfBase64 field
either way, so sealed is what tells you which you are holding.

The id is resolved in the caller's OWN tenant store, so another org's document
id is a 404.

## Request

1 field.

| Field | In   | Type   | Required | Description                   |
| ----- | ---- | ------ | -------- | ----------------------------- |
| `id`  | path | string | yes      | ID is the document to act on. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | esign.esignPDF  | ok      |
| `default` | problem-details | refused |

`200` body — 5 fields.

| Field       | In   | Type    | Always | Description                                                                                                                                                         |
| ----------- | ---- | ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `filename`  | body | string  | —      | Filename is the name to save it under, built from the title and marked \_signed once it is sealed.                                                                  |
| `id`        | body | string  | —      | ID is the document this PDF was rendered from.                                                                                                                      |
| `pdfBase64` | body | string  | —      | PdfBase64 is the PDF itself, base64-encoded.                                                                                                                        |
| `sealed`    | body | boolean | —      | Sealed is whether this is the SEALED artifact — the field values rendered onto the page and a real x509 PKCS#7 signature applied — rather than the original upload. |
| `status`    | body | string  | —      | Status is the document's state at the moment it was read.                                                                                                           |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo esign documents download <id>
```

**SDK**

**.ts**

```ts
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEsignDocumentsByIdDownload({ id: 'id' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EsignApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EsignApi(client).get_esign_documents_by_id_download(id='id')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EsignAPI.GetEsignDocumentsByIdDownload(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, esign_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = esign_api::get_esign_documents_by_id_download(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EsignApi(client).getEsignDocumentsByIdDownload();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/esign/documents/<id>/download \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **esign** through the `esign` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_esign_documents"
         }
       }
     }'
```

---

[eSign API](https://docs.hanzo.ai/docs/openapi/esign) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
