---
title: "A PDF failed"
method: POST
path: "pdf.failed"
---

# A PDF failed

`POST pdf.failed` (webhook)

Sent to your endpoint as a POST. Answer 2xx within 10 seconds; anything else is retried for about 24 hours.

## Headers

- `CastPDF-Signature` string, required
- `CastPDF-Event-Id` string, required
- `CastPDF-Event-Type` string, required

## Payload

- object
  - `id` string, required: evt_ followed by 32 hex characters; the same for every endpoint receiving it.
  - `type` 'pdf.failed', required
  - `created_at` string, date-time, required
  - `livemode` boolean, required
  - `test_event` boolean: Present (true) only on events sent with "Send test event".
  - `data` object, required
    - `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.
    - `filename` string
    - `metadata` object, nullable
    - `batch_id` string, nullable
    - `error_message` string

## Acknowledgement `200`

Any 2xx acknowledges the event.

---

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