---
title: "Server-rendered invoice email preview (nothing sent)"
method: GET
path: "/companies/{companyId}/ar/{id}/email-preview"
tags: ["AR/AP"]
---

# Server-rendered invoice email preview (nothing sent)

`GET /companies/{companyId}/ar/{id}/email-preview`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/ar/{id}/email-preview`
- Auth: HTTP bearer

DARK — 404s unless ar_ap_items_enabled. Returns the exact email the send/resend path dispatches as { to, subject, html } — same recipient resolution, same template — without sending anything, without an FSM transition, and without stamping email_sent_at. `to` is null when the counterparty has no email on file (the preview still renders). Drafts are refused: a draft has no send contract yet.

## Response `200`

Rendered email preview: { to, subject, html }

## Other responses

- `404`: Not found or AR/AP not enabled
- `422`: Draft or never-sent invoice, or email delivery not configured on this deployment.

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
