PATCH

Update Automation Email Action


Developer Preview

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

Updates an automation's send email action.

Only the fields listed in fieldMask are updated. A listed field that's left empty is reset to its default, so passing "senderDetailsId": null returns the action to the site's default sender details.

Some fields are updated together:

  • Changing emailType also replaces notificationTopicId, with the one in the request, or with the new email type's default when it's left empty.
  • Updating recipients, or any of its fields, replaces all the action's recipients with the ones in the request.

At least 1 field must be listed, and each fieldMask path must name a field of the action. A path can end at a repeated field, such as recipients.customOptions.audiences, but can't continue into it. Other paths are rejected with INVALID_ARGUMENT.

Changes apply from the automation's next run, whether the automation is active or not. The action is stored in the automation's configuration, so the update increments the automation's revision. Retrieve the automation again before updating it with Update Automation.

Specifying CUSTOM recipients also requires the AUDIENCE.AUDIENCE_PROVIDER_READ permission, to check their audience providers.

There's no revision to pass and no concurrency check: the last write wins.

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
PATCH
https://www.wixapis.com/emails-automations/v1/automations/{automationId}/email-actions/{actionId}

Errors
400Invalid Argument

There are 6 errors with this status code.

404Not Found

There is 1 error with this status code.

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

Did this help?