---
title: "Download Library Document"
method: GET
path: "/library/documents/{document_id}/download"
tags: ["Documents"]
---

# Download Library Document

`GET /library/documents/{document_id}/download`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/library/documents/{document_id}/download`
- Auth: HTTP bearer

The document's ORIGINAL bytes, with its own content type.

The one route on this surface that is NOT the `ApiResponse` envelope: a
PDF wrapped in JSON is not a PDF. Same precedent as
`GET /knowledge/export`. Content type and filename come from the stored
document, so a text document comes back as text and a PDF as a PDF.

## Path parameters

- `document_id` string, required: Document id.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Response `200`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
