---
title: "Download document group"
method: POST
path: "/documentgroup/{document_group_id}/downloadall"
---

# Download document group

`POST /documentgroup/{document_group_id}/downloadall`

## Request

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

This endpoint allows API users to download all documents of the document group as a ZIP archive or a single PDF file.

The `type` body parameter sets the format:

* `zip`: a ZIP archive with each document as a separate PDF.
* `merged`: one PDF with all documents of the group.
* `certificate`: one PDF with all documents and attachments, stamped with the document group ID, followed by the history.
* `email`: a ZIP archive with the documents that have the document group 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.

## Request body

- object
  - `type` string, required: Type of the download format. Allowed values: `zip`, `merged`, `certificate`, `email`.
  - `with_history` string, required: Whether or not to attach document history to the download. Allowed values: `no`, `after_each_document`, `after_merged_pdf`.
  - `document_order` string[]: The order of documents in the merged file.

## Response `200`

The document group file. The content type depends on `type`: `application/zip` for `zip` and `email`, `application/pdf` for `merged` and `certificate`.

- unknown

## Other responses

- `400`: Request with any of these cases: * invalid token. * expired token. * empty header. * authorization = null.

---

[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)
