---
title: "Download document"
method: GET
path: "/document/{document_id}/download"
---

# Download document

`GET /document/{document_id}/download`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/document/{document_id}/download`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/document/:document_id/download/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows API users to download a document as a PDF file or a ZIP archive.

The `type` query parameter sets the format:

* Not set: the original PDF, as uploaded.
* `collapsed`: a PDF with the filled fields.
* `zip`: a ZIP archive with the PDF and any attachments on the document.
* `email`: a ZIP archive with the PDF that has the document ID on each page, attachments, and the history file if history is requested.

**Notes**

* The file is returned in the response body with a `Content-Disposition: attachment` header that carries the file name.
* `with_history=1` takes effect only together with `type`. Without `type`, the original PDF is returned.

## Response `200`

The document file. The content type depends on `type`: `application/pdf` when `type` is not set or is `collapsed`, `application/zip` when `type` is `zip` or `email`.

- unknown

## Other responses

- `400`: * Wrong, expired, or missing token. * The document doesn't exist. * The document belongs to another user.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
