---
title: "Download document group"
url: "https://docs.signnow.com/docs/document-group/operations/post-documentgroup-document_group_id-downloadall"
type: "endpoint"
section: "document-group"
slug: "document-group/operations/post-documentgroup-document_group_id-downloadall"
method: "POST"
path: "/documentgroup/{document_group_id}/downloadall"
operation_id: "post-documentgroup-document_group_id-downloadall"
authorization: "bearer"
---

# Download document group

`POST /documentgroup/{document_group_id}/downloadall`

This endpoint allows users to download all documents of the document group.


## Authorization

bearer

## Path Parameters

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

## Request Body

**Schema**

```json
{
  "type": "object",
  "required": [
    "type",
    "with_history"
  ],
  "properties": {
    "type": {
      "type": "string",
      "description": "Type of the download format. Allowed values: `zip`, `merged`, `certificate`, `email`."
    },
    "with_history": {
      "type": "string",
      "description": "Whether or not to attach document history to the download. Allowed values: `no`, `after_each_document`, `after_merged_pdf`."
    },
    "document_order": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The order of documents in the merged file."
    }
  },
  "x-examples": {
    "Example 1": {
      "type": "merged",
      "with_history": "after_merged_pdf",
      "document_order": [
        "2731940ca423d065d99833df3dacf359a94e3e33",
        "4f46709eecac1f77e69deb5d4dd8cc9167356954"
      ]
    }
  }
}
```

**Example** (`Download merged document group with history `)

```json
{
  "type": "merged",
  "with_history": "after_merged_pdf",
  "document_order": [
    "27XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "4fXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  ]
}
```

## Responses

### 200

Zipped binary file (application/zip content)

### 400

Request with any of these cases:

* invalid token 
* expired token 
* empty header
* authorization = null

**Example** (`Authorization error`)

```json
{
  "code": 1537,
  "message": "invalid_token"
}
```

## Code Examples

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

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/documentgroup/{document_group_id}/downloadall" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type": "merged", "with_history": "after_merged_pdf", "document_order": ["27XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "4fXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]}'
```

---
*Full reference: https://docs.signnow.com/docs/document-group/operations/post-documentgroup-document_group_id-downloadall*
