---
title: "Render Contextual Email Preview"
method: POST
path: "/api/email-preview/contextual"
---

# Render Contextual Email Preview

`POST /api/email-preview/contextual`

Render an email exactly as it would be sent for the given entity, without
sending. Used by the in-dialog EmailPreviewPanel on the frontend.

Read-only: never writes to DB, never sends an email.

## Query parameters

- `user_id` string
- `org_id` string

## Request body

- ContextualPreviewRequest
  - `kind` string, required — One of: invoice_send, invoice_test, invoice_payment_reminder, proposal_send, proposal_test, payment_confirmation
  - `entity_id` string, required — Invoice / proposal / payment ID
  - `custom_message` string, nullable
  - `test_email` string, nullable

## Response `200`

Successful Response

- ContextualPreviewResponse
  - `kind` string, required
  - `template_name` string, required
  - `subject` string, required
  - `to` string[], required
  - `cc` string[], required
  - `from_label` string, required
  - `reply_to` string, required
  - `html` string, required
  - `warnings` string[], required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/every/apis/every-api.md) · [All operations](https://skmtc.net/every/apis/every-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/every/every-api/versions/9744001af85d/schema)
