For the complete documentation index, see llms.txt. This page is also available as Markdown.

Download Envelope Archive

This document explains how to download a completed envelope archive through DocStudio API.

Endpoint

Method
Endpoint

GET

/api/v1/envelope/{id}/zip

Headers

Header
Required
Description

Authorization

Yes

Bearer authorization token

Mailbox

Yes

UUID of the mailbox used as the current mailbox context

Path parameters

Parameter
Type
Required
Description

id

UUID

Yes

UUID of the envelope to download

Query parameters

Parameter
Type
Required
Description

documentId

string

No

ID of one document to include in the archive

excludeFiles

string

No

Mask defining which generated files must be excluded

zipStructureName

string

No

Name of a ZIP structure previously saved in the envelope template

wait

boolean

No

Wait for the archive to become available instead of returning 425

Download the complete envelope archive

GET /api/v1/envelope/89499ba2-287d-404c-87b0-342dc5b01b6a/zip?wait=true
Authorization: Bearer {token}
Mailbox: 9baec31c-e940-4894-b6d1-52033e1af66e

Download one document

Pass the document ID through the documentId query parameter when only one envelope document is required. The document ID must come from the envelope or template structure.

Exclude generated files

Use excludeFiles to remove generated files that are not required in the downloaded archive. Combine several values in one mask when multiple file types must be excluded.

Value
Excluded files

c

Signature or processing certificates

p

Printable versions

a

Audit trail

For example, excludeFiles=cp excludes certificates and printable versions:

Response

A successful request returns 200 OK with the archive as binary content using the application/octet-stream media type. Save the response body as a .zip file instead of attempting to process it as JSON.

If wait is set to true, the request waits for the archive to become available. Without this option, the API can return 425 when the requested archive has not been generated yet.

Status codes

Code
Description

200

Archive returned successfully

425

Archive is not ready and the request did not wait for it

Last updated

Was this helpful?