Skip to main content

Create Campaign

POST 

/campaign

Create a new campaign

  • contentSourceUrl - While adding campaign into system we will verify contentSourceUrl. If verification is failed, we will abort the campaign creation process.
  • contactIds - Contact Ids. Refer Contacts API
  • schedule.dateTime - Campaign schedule time in UTC
  • schedule.days - Recurring campaign days
  • schedule.time - Recurring campaign time in HH:mm:ss format

Campaign Status Scenarios:

  1. Draft Campaign (No Schedule Provided):
    • If the schedule object is not included in the payload, the campaign will be in the Draft status. This means the campaign is saved but not scheduled for delivery yet.
  2. Scheduled Campaign (DateTime Provided):
    • If the schedule object is present, and it has a non-empty dateTime field, the campaign will be in the Scheduled status. This indicates that the campaign is scheduled for delivery at the specified date and time.
  3. Recurring Campaign (Days and Time Provided):
    • If the schedule object has days and time specified, the campaign will be in the Recurring status. This means the campaign is set to recur on the specified days at the provided time.

Request

Body

required
    contentSourceUrl string
    campaign objectrequired
    name stringrequired
    subject stringrequired
    previewText string
    senderId uuidrequired
    template objectrequired
    html stringrequired
    contactIds string[]
    schedule object
    dateTime string
    days string[]
    time string

Responses

Successful operation
The status could be one of

  • DRAFT - The campaign will be this state until client confirms sender details through email
  • SCHEDULED - campaign successfully scheduled in our system
  • LAUNCHED - campaign is launched at the specified date/time
  • COMPLETED - will only be in case when campaign is scheduled for type - ONCE
  • PAUSED - When campaign is PAUSED
  • FAILED - will be FAILED, after launching a campaign if contentSourceURL is not present or down or we receive invalid content from this URL.
Schema
    id uuid
    status string
Loading...