---
title: "Preview exact invoice email and PDF delivery"
method: POST
path: "/invoices/{id}/preview"
tags: ["Invoicing"]
---

# Preview exact invoice email and PDF delivery

`POST /invoices/{id}/preview`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/invoices/{id}/preview`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Renders the exact canonical email and branded PDF without posting, sending, changing invoice status, or persisting a payment link. When includePaymentLink=true, the preview contains a signed candidate link that is persisted only by the confirmed send. API-key callers can pass the returned previewToken for exact delivery confirmation, or use a direct send with confirmed=true when a preview is not needed.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `recipientEmail` string, email: Defaults to the customer contact email
  - `subject` string: Defaults to the canonical invoice subject
  - `personalMessage` string
  - `attachPdf` boolean
  - `includePaymentLink` boolean: Shows a signed candidate payment link and persists it only when the confirmed send runs

## Response `200`

Exact email HTML/text, PDF base64 bytes, and a short-lived preview token. Invoice amounts are integer cents.

## Other responses

- `409`: Preview is no longer current, or invoice delivery is invalid
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
