POST

Update Composer


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

Set campaignEditorType.value to the campaign's editorType, which Get Campaign returns, and pass composerDataJson in the matching format. Don't change a campaign's editor type, except that you can update a MOBILE campaign with WEB. If composerDataJson doesn't match the editor type, the campaign can't be sent or previewed correctly.

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

This method may require higher-level permissions than the caller has, based on their identity and roles and permissions. In these cases, you can ensure the method is called with the required level of authorization by using one of the following:

Permission Scopes
Manage Email Marketing
Learn more about app permissions.
Method Declaration
Copy
Errors

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

Did this help?