Update newsletter content
update_campaign_contentReplaces the complete contentJson of a draft newsletter in the authenticated inviomail tenant. Use only native inviomail blocks; do not include full HTML email layouts, custom layout wrappers, responsive variants, footer, signature, unsubscribe text, or inviomail credit. First call get_campaign_content, edit that complete document, and use its contentRevision as expectedContentRevision and draftRevision as expectedDraftRevision. Add or change visibility rules only when the returned capability.enabled is true; when false, existing rules may be preserved while editing other content or removed, but not changed or added. Call validate_campaign_content first and pass the returned normalizedContent when valid. Existing image sources may be preserved, moved, duplicated, or removed; new or changed image sources must use tenant-owned URLs returned by list_media_images, upload_media_image_file, or import_media_image_from_url. This tool never schedules or sends a campaign. 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>",
"expectedDraftRevision": "<expectedDraftRevision>",
"contentJson": "<contentJson>"
},
"name": "update_campaign_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaignId | Yes | Newsletter campaign ID | |
| contentJson | Yes | Complete replacement newsletter contentJson document, not a partial patch. 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. | |
| expectedDraftRevision | Yes | Exact draftRevision returned by get_campaign_content before editing | |
| expectedContentRevision | Yes | Exact contentRevision returned by get_campaign_content before editing |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign | Yes | ||
| requestId | Yes |