Preview a rendered message
From the Campaigns API reference. Requests use the base URL https://app.warmerly.com/api/v1 and an API key, see Authentication.
POST /campaigns/{id}/previewRenders 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. |
{
"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.