List download

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

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

Addresshttps://api.hanzo.ai/v1/esign/documents/{id}/download
MethodGET
Operationget_esign_documents_by_id_download
AuthAuthorization: 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.

FieldInTypeRequiredDescription
idpathstringyesID is the document to act on.

Response

StatusBodyMeaning
200esign.esignPDFok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
filenamebodystring—Filename is the name to save it under, built from the title and marked _signed once it is sealed.
idbodystring—ID is the document this PDF was rendered from.
pdfBase64bodystring—PdfBase64 is the PDF itself, base64-encoded.
sealedbodyboolean—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.
statusbodystring—Status is the document's state at the moment it was read.

Failure carries the platform error shape — see Errors.

Examples

hanzo esign documents download <id>
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEsignDocumentsByIdDownload({ id: 'id' });
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')
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
}
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?;
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();
curl https://api.hanzo.ai/v1/esign/documents/<id>/download \
  -H "Authorization: Bearer $HANZO_API_KEY"

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:

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 · All Hanzo APIs · Interactive reference

Was this page useful?