POST

Generate Action Input Mapping


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Generates the input mapping of a new send email action, along with the email content it sends.

Use the response to add a send email action to an automation with the Automations V2 API: set appDefinedInfo.appId, appDefinedInfo.actionKey and appDefinedInfo.inputMapping from appId, actionKey and inputMapping. Once the action is added, manage its email content with Set Email Content.

inputMapping is an opaque structure: pass it as is, rather than building or modifying it.

The action is set up as described by action, and anything it leaves out gets the same value the automations builder gives a new send email action. The email content is content when given, and the default template's content otherwise. The content stays a draft while the automation is a draft or inactive, and goes live when the automation is activated.

Every call creates new email content, so generate an input mapping when you're about to add the action. Use each input mapping for a single action only, and don't add it to more than one action, in the same automation or in different ones. Actions that share an input mapping share their email content: updating it through one action changes the email of all of them, and removing one of them deletes the content the others send.

content is checked like in Set Email Content, and rejected with CONTENT_NOT_PUBLISHABLE when it isn't publishable. On a multilingual site, content is stored in the site's primary language only, other languages start from the default template's content, and content.editorType can't change the default template's format.

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/emails-automations/v1/automations/email-actions/generate-input-mapping

Errors
400Invalid Argument

There are 4 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?