This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates the email content of an automation's send email action.
The content is replaced in full, and is live for subsequent runs of the automation once the
call returns. Replaced in full means anything left out of content is cleared, so omitting the
preview text or a default placeholder value removes it rather than keeping what was stored. The
one exception is editorType, which describes the content type rather than being part of it.
This operation doesn't preserve draft translations: after the update, the email content and every existing draft translation are published and become live.
A draft automation is the exception: its content is updated in the draft only, and nothing is published. The content, in every language, goes live when the draft automation is published.
There's no revision to pass and no concurrency check: the last write wins, and two callers updating the same email at once silently overwrite one another.
The most reliable way to update content is to first retrieve it with Get Email Content
and modify the result, rather than building content from scratch. WEB content in
composer.composerDataJson is a proprietary structure. It's checked before storage and rejected
with CONTENT_NOT_PUBLISHABLE when it isn't a JSON object, has no regions, or has a region with no
type, an unsupported type, no data, or data missing the objects its type requires.
To create content from scratch, use the MJML or HTML editor type. If the content may later be
opened in AI Composer, see Update Composer
for the MJML components it can edit and the limitations of other components.
You can only call this method when authenticated as a Wix app or Wix user identity.
There are 3 errors with this status code.
There is 1 error with this status code.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.