Skip to content

Preview a campaign

POST /campaigns/{id}/preview

Render the campaign template against three sample contacts from the list, optionally calling the LLM for subject/preheader suggestions and a tone score. Use this before launch to sanity-check copy and pick the strongest subject line.

FieldTypeDefaultDescription
generate_subjectsbooltrueReturns 5 AI subject candidates.
generate_preheadersbooltrueReturns 3 AI preheader candidates.
run_tone_linterbooltrueReturns a 1–5 salesy-ness score + flagged lines.
Terminal window
curl -X POST https://mail.3ava.com/api/campaigns/camp_a1b2.../preview \
-H "Authorization: Bearer am_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{}'
{
"sample_renders": [
{
"contact_email": "[email protected]",
"subject": "Maria, your April update",
"preheader": "What's new this month",
"html": "<p>Hi Maria,</p>...",
"text": "Hi Maria,\n..."
}
],
"subject_suggestions": [
"Your April update, {{first_name}}",
"{{first_name}}, three things this month",
"April at Acme — {{first_name}}",
"What we shipped this April",
"{{first_name}}, a quick April note"
],
"preheader_suggestions": [
"Three new features and a quiet bug fix.",
"What changed this month at Acme.",
"Plus the one thing we're trying next."
],
"tone_score": 2,
"tone_notes": "Reads as warm and informational — not salesy.",
"estimated_recipients": 19872,
"llm_errors": []
}