Preview newsletter content
preview_campaign_contentRenders the complete editorial candidate native inviomail contentJson for a draft newsletter with the authenticated tenant's current typography, link defaults, footer, signature, responsive behavior, and inviomail credit. Conditional blocks require the tenant's conditional-content capability; the backend rejects unauthorized candidates. Conditional blocks are included together in this editorial candidate; the inviomail Admin UI separately provides complete evaluated visual previews for actual recipient variants. Do not include footer, signature, unsubscribe text, inviomail credit, or separate responsive variants in contentJson. It returns email HTML, plain text, and normalized content without saving anything. Use the contentRevision from get_campaign_content as expectedContentRevision. Validate first and pass normalizedContent when valid. New or changed image sources must be tenant-owned URLs returned by inviomail media tools. Button blocks support bold (default true) and optional fontSize (integer 10–30 px) for desktop; omit fontSize to inherit tenant body typography. Optional mobileFontSize (integer 16–24 px) controls mobile text separately, with tenant bodyMobilePx as the readability floor; omit it to retain the mobile standard. Long button labels wrap automatically. Own contact fields are supported only in heading.text and text.html, including two-column children: {{custom.key}} or {{custom.key | default: "replacement text"}}. Read list_contact_fields first and use its permanent keys; offer active fields for new insertion. Existing archived references still resolve. Missing/blank values use the fallback or empty text. Escape fallback JSON and HTML correctly; do not split a token with inline markup. Tenant validation reports invalid syntax, unsupported locations and unknown keys. Custom field placeholders are not supported in subjects, preheaders, buttons, URLs, footers, signatures or DOI emails.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaignId": "<campaignId>",
"expectedContentRevision": "<expectedContentRevision>",
"contentJson": "<contentJson>"
},
"name": "preview_campaign_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaignId | Yes | Newsletter campaign ID | |
| contentJson | Yes | Complete candidate newsletter contentJson document. For type button (also in two-column children), bold defaults to true and optional fontSize is an integer 10–30 px for desktop; omit fontSize for tenant body typography. Optional mobileFontSize (integer 16–24 px) controls mobile text separately, with tenant bodyMobilePx as the readability floor; omit it to retain the mobile standard. Long button labels wrap automatically. | |
| personalization | No | Optional personalization: {mode:"contact",contactId:"tenant-contact-uuid"} uses that contact as the data source; {mode:"empty"} renders fallbacks without custom field values. Omit for literal preview tokens or, on test sends, values of an existing contact matching toEmail. The test email is always delivered to toEmail; the selected contact is not subscribed, tagged, or unsubscribed by selecting it. Find contact IDs with search_contacts or get_contact_by_email. | |
| expectedContentRevision | Yes | Exact contentRevision returned by get_campaign_content before editing |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | Yes | ||
| campaign | Yes | ||
| requestId | Yes | ||
| designContextUpdatedAt | Yes |