Skip to content
View as Markdown
Enter your site to enable Send. Requests are sent from your browser, so the site must allow cross-origin calls (CORS).

POST Preview Campaign Email HTML​

POST
/campaigns/email-preview-html

Generate a rendered HTML preview of a campaign email. Can preview either a saved campaign (by campaign_id) or unsaved campaign data passed in the request body. SmartCodes and template rendering are applied. Optionally preview as a specific contact.

Required capability: fcrm_read_emails or fcrm_manage_emails — which one applies depends on the action being performed.

Enforced by CampaignPolicy::verifyRequest(), the policy default for this route group.

Authorizations​

ApplicationPasswords

WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password

Type
API Key (header: Authorization)

Request Body​

application/json
JSON
{
"campaign_id": 0,
"campaign": {
"email_body": "string",
"email_pre_header": "string",
"design_template": "string",
"settings": {
},
"post_content": "string",
"post_excerpt": "string"
},
"contact_id": 0,
"disable_subscriber": "string"
}

Responses​

Email preview HTML generated successfully.

application/json
JSON
{
"preview_html": "string"
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI