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.
Body parameters
Section titled “Body parameters”| Field | Type | Default | Description |
|---|---|---|---|
generate_subjects | bool | true | Returns 5 AI subject candidates. |
generate_preheaders | bool | true | Returns 3 AI preheader candidates. |
run_tone_linter | bool | true | Returns a 1–5 salesy-ness score + flagged lines. |
Example
Section titled “Example”curl -X POST https://mail.3ava.com/api/campaigns/camp_a1b2.../preview \ -H "Authorization: Bearer am_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{}'Response
Section titled “Response”{ "sample_renders": [ { "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": []}