---
title: "Download document"
method: GET
path: "/v2/document/download"
tags: ["File Commands"]
---

# Download document

`GET /v2/document/download`

## Request

- Base URL: `https://api.ocrolus.com`
- URL: `https://api.ocrolus.com/v2/document/download`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.ocrolus.com/oauth/token`

Downloads a <<glossary:Document>> that has been uploaded to a <<glossary:Book>>.
---
> 📘 Note
> A regular <<glossary:Document>> (`doc_type=UploadedDoc`, the default) cannot be downloaded while its status is `FAILED`, `DELETING`, or `DELETED`. Attempting to do so returns the **No Permission** error (code `2104`).

> 🚧
> Requests to this endpoint will download the requested <<glossary:Document>> directly to your current working directory, therefore there is no documentation for a JSON response schema for a successful request.

## Query parameters

- `doc_type` 'UploadedDoc' | 'MixedUploadedDoc'

## Response `200`

Success. The Document is returned directly as a file download, so there is no JSON response body.

## Other responses

- `400`: Client Errors
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ocrolus/apis/file-commands.md) - [All operations](https://skmtc.dev/ocrolus/apis/file-commands/llms.txt) - [OpenAPI document](https://skmtc.dev/ocrolus/apis/file-commands/revisions/387371d96db7?raw)
