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

Downloads a document.

Possible values for `type` query param are `collapsed`, `zip` and `email`. 

`Collapsed` returns the raw data of the pdf document that can be written to a blank .pdf file. 

`Zip` returns the raw data of a zip file containing the pdf and any attachments on that document that can be written to blank a .zip file. 

`Email` returns zip file with document that have ID on each page, attachments and history file in case history has been requested. 

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_id` | string | Yes |  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | Yes | Types of document to download |
| `with_history` | string | No | downloads collapsed document with a table containing the document's history if with_history=1 |

## Responses

### 200

## 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*
