Campaigns

Create a campaign

Create a campaign in draft. Target either a saved segment (segment_id, see Create a segment) or an inline recipients list, and optionally scope it to a subscription topic (topic_id) so contacts who opted out of that topic are skipped automatically. Content comes from a published template_id (campaigns have no inline html/text). Nothing is sent yet — edit the draft with Update a campaign, check it with Validate a campaign, then launch it with Send a campaign. Requires the campaigns:write capability.

post/email/campaigns

Request

  • Base URL: https://www.unitpost.com/api/v1
  • URL: https://www.unitpost.com/api/v1/email/campaigns
  • Auth: HTTP bearer

Request body

namestring required
template_idstring required
segment_idstring
recipientsstring[]
topic_idstring
fromstring required
subjectstring
preview_textstring
scheduled_atstring
open_trackingboolean nullable
click_trackingboolean nullable
variable_fallbacksobject
excluded_contact_idsstring[]

Response

Created.

object'campaign' required
idstring required
namestring required
template_idstring required
segment_idstring required
topic_idstring nullable required
fromstring required
subjectstring nullable required
preview_textstring nullable required
open_trackingboolean nullable required
click_trackingboolean nullable required
status'draft' | 'scheduled' | 'sending' | 'paused' | 'sent' | 'canceled' | 'failed' required
scheduled_atstring nullable required
variable_fallbacksobject required
excluded_contact_idsstring[] required
total_recipientsnumber required
sent_countnumber required
failed_countnumber required
created_atstring required
updated_atstring required

Changes

No recorded changes to this operation across all 1 revision of this API.