---
title: "Get a document"
method: GET
path: "/v1/pdf/{id}"
tags: ["PDFs"]
---

# Get a document

`GET /v1/pdf/{id}`

## Request

- Base URL: `https://api.castpdf.com`
- URL: `https://api.castpdf.com/v1/pdf/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Response `200`

OK

- Document
  - `id` string, uuid
  - `status` 'queued' | 'processing' | 'succeeded' | 'failed' | 'canceled'
  - `pages` integer, nullable
  - `bytes` integer, nullable
  - `mode` 'fast' | 'print' | 'null', nullable
  - `test` boolean
  - `template_id` string, nullable
  - `template_version` integer, nullable
  - `error_code` string, nullable
  - `created_at` string, date-time
  - `expires_at` string, date-time, nullable
  - `url` string, uri, nullable: Signed download link, valid until expires_at.
  - `thumbnail_url` string, uri, nullable: Signed PNG of the first page (480 px wide) while the PDF is stored; made on first request. In GET /v1/pdf/{id} and GET /v1/documents, not in webhook events.
  - `delivery` object, nullable
    - `email` object
      - `status` 'queued' | 'sent' | 'failed' | 'suppressed'
      - `reason` 'over_limit' | 'not_stored' | 'send_failed': Why a failed email was not delivered.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/castpdf/apis/castpdf-api.md) · [All operations](https://skmtc.dev/castpdf/apis/castpdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/castpdf/apis/castpdf-api/revisions/4ec737ba2ba6?raw)
