A Campaign is a targeted email marketing message sent to the members of a
CustomerSegment. Campaigns can be scheduled in advance and track when they
were sent. Campaign contents (localised subject and body) and send records
(per-recipient delivery tracking) are managed as sub-resources of a campaign.
Creates a copy of the given Campaign, duplicating its segment and content
records. The copy is created in an unsent state with no scheduled_at or
sent_at values. Optionally provide a name for the copy; defaults to the
original campaign's name if omitted.
Queues the given Campaign for sending to all subscribed members of its
associated CustomerSegment. Members with a non-null unsubscribed_at are
excluded. Individual CampaignSend records are created for each recipient
and processed asynchronously.
The CampaignContent used for each recipient's CampaignSend is selected
based on the customer's preferred_locale, falling back to the site's
locale if no CampaignContent exists for the customer's preferred locale.
Returns 202 Accepted immediately; use the listCampaignSends endpoint
to track delivery progress.
Renders a preview of the given CampaignContent, substituting the content
body with the value supplied in the request body. Returns the rendered HTML as a plain
string response.
Returns the CampaignSend with the given ID. Requesting with an
Accept: text/html header returns the rendered HTML body of the sent
email instead, and responds with 404 if the send has no stored content
to render.
The campaign send was successfully retrieved. Requesting with an Accept: text/html
header returns the rendered email body as HTML instead of the CampaignSend record.