POST

Publish Campaign


Publishes and sends a specified campaign.

If the email_distribution_options object isn't passed in the request, the campaign is only published as a landing page.

Authentication

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

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

Path Params
campaignIdstringRequired

Campaign ID

Body Params
emailDistributionOptionsEmailDistributionOptions

Email distribution options. Pass this object in the request if you need to distribute your marketing campaign with emails.

Response Object
publishingDataPublishingData

Publishing info.

Publish Campaign
Request
cURL
curl -X POST 'https://www.wixapis.com/email-marketing/v1/campaigns/98b5a0b3-549b-4e58-b933-a8bd40923a14/publish' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' -d '{ "emailDistributionOptions": { "emailSubject": "Yoga with puppies", "labelIds": ["contacts-all"] } }'
Response
JSON
{ "publishingData": { "landingPageUrl": "https://shoutout.wix.com/so/{code}", "datePublished": "2022-09-22T12:58:37.407664Z" } }
Errors
428Failed Precondition

There is 1 error with this status code.

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

Did this help?