# Preview a rendered message

> Renders one step exactly as it would send, merge fields resolved against a real lead, AI opener included, sender identity and footer applied, without sending…

Source: https://warmerly.com/docs/campaigns/preview-a-rendered-message

```text
POST /campaigns/{id}/preview
```

Renders one step exactly as it would send, merge fields resolved against a real lead, AI opener included, sender identity and footer applied, without sending anything.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `stepOrder` | integer (1-based) | One of `stepOrder`/`stepId` | Position of the step in the sequence. Prefer this: `PUT /campaigns/{id}/steps` replaces all steps, so step ids change on every save while positions survive. |
| `stepId` | string (UUID) | One of `stepOrder`/`stepId` | A specific step. Exactly one of the two must be given. |
| `leadId` | string (UUID) | No | Render against this lead. Defaults to the next lead due out. |
| `randomLead` | boolean | No | Render against a random queued lead instead of the next one. |
| `regenerate` | boolean | No | Bypass the cached AI opener and generate a fresh one. Spends AI credits. |

```json
{
  "from": { "name": "Jane from Acme", "address": "jane@acme.com" },
  "to": "lead@example.com",
  "lead": { "id": "…", "email": "lead@example.com", "companyName": "Example Ltd", "firstName": "Sam" },
  "blankTags": [],
  "noLinkMode": false,
  "noLinkMessage": null,
  "subject": "Quick question about Example Ltd",
  "text": "…",
  "html": "<p>…</p>",
  "unsubscribeUrl": "https://…",
  "aiUsed": false,
  "openerCached": false,
  "hasResearch": false,
  "openerFailure": null
}
```

`blankTags` lists merge tags that came out empty for this lead. `openerFailure` is non-null when this step would not be sent to this lead as it stands. The step must be an email step (`400` otherwise, `404` if the step does not exist). With no usable lead or no sender it returns `400 bad_request` with `error.details.reason` `no_leads` or `no_sender`. The default lead is the oldest queued one, or any lead with an email once the queue is empty.

## More from Campaigns

- [Readiness check](https://warmerly.com/docs/campaigns/readiness-check): Everything that would stop this campaign sending, as a list of checks, the same set the dashboard shows…
- [Leads across every campaign](https://warmerly.com/docs/campaigns/leads-across-every-campaign): One flat, paged view of every lead in the project's campaigns, rather than one campaign at a time.…
- [Per-lead enrichment and history](https://warmerly.com/docs/campaigns/per-lead-enrichment-and-history): emails returns { "emails": [...] }: every message scheduled for that lead in this campaign, ordered by…
