POST

Update Composer


Updates a campaign's editor data, including the content and subject line.

The composerDataJson format must match the campaign's existing campaignEditorType. Passing a mismatched format causes a silent failure when sending or previewing the campaign.

An MJML document uses mjml and mj-body, and may include mj-head. For MJML syntax, see the MJML documentation. Within that document structure, AI Composer can fully edit these components:

  • Layout: mj-section, mj-column, mj-group, mj-wrapper, mj-hero.
  • Content: mj-text, mj-image, mj-button, mj-divider, mj-spacer, mj-social.
  • Head: mj-attributes, mj-class, mj-all, mj-font, mj-style, mj-breakpoint, mj-preview, mj-title.

Inside mj-text, AI Composer supports simple formatting: paragraphs, headings (h1 to h3), lists, links, bold, italic, underline, and colors. Other MJML layout, content, and head components aren't supported for editing. Some, including mj-accordion, mj-carousel, mj-navbar, and mj-raw, may render, but AI Composer can only duplicate or delete them. Avoid mj-table: opening it in AI Composer removes its rows and turns the table into a single line of text.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permission Scopes
Manage Email Marketing
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/email-marketing/v1/campaigns/{campaignId}/composer

Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?