---
title: "List documents (newest first)"
method: GET
path: "/v1/documents"
tags: ["Documents"]
---

# List documents (newest first)

`GET /v1/documents`

## Request

- Base URL: `https://api.castpdf.com`
- URL: `https://api.castpdf.com/v1/documents`
- Auth: HTTP bearer

## Query parameters

- `limit` string
- `before` string

## Response `200`

OK

- object
  - `data` 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.
  - `next_before` string, nullable

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