---
title: "Download document"
url: "https://docs.signnow.com/docs/document/operations/download-document"
type: "endpoint"
section: "document"
slug: "document/operations/download-document"
method: "GET"
path: "/document/{document_id}/download"
operation_id: "download-document"
authorization: "bearer"
---

# Download document

`GET /document/{document_id}/download`

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.

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_id` | string | Yes | ID of the document. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | No | Format of the download. Allowed values: `collapsed`, `zip`, `email`. If not set, the original PDF is returned. |
| `with_history` | string | No | Set to `1` to include the document history in the download. Takes effect only together with `type`. |

## Responses

### 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`.

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X GET \
  "https://api.signnow.com/document/{document_id}/download" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN"
```

---
*Full reference: https://docs.signnow.com/docs/document/operations/download-document*
