Create a Campaign

Create a new campaign using the API. This can be a regular or autoresponder campaign, and allows advanced customization like segments, template content, scheduling, and optional configurations.

🆕 Create a Campaign

Use this endpoint to create and schedule a campaign using a template and optional features like URL tracking and stats reporting.


🔹 HTTP Request

POST API-URL/campaigns

🔎 POST Parameters

Parameter
Type
Required
Description

campaign

array

Yes

Array containing campaign details.


📦 Campaign Block

Parameter
Type
Required
Description

name

string

Yes

Name of the campaign.

type

string

No

Type: regular or autoresponder. Default: regular.

from_name

string

Yes

Sender name.

from_email

string

Yes

Sender email.

subject

string

Yes

Subject of the email.

reply_to

string

Yes

Email address for replies.

send_at

datetime

Yes

When to send the campaign (Y-m-d H:i:s). Uses customer's timezone.

list_uid

string

Yes

Target list unique ID.

segment_uid

string

No

Optional segment to target a specific audience.

options

array

No

Optional settings like tracking, feeds, stats email, etc.

template

array

Yes

Content or reference to the email template.


🖌️ Template Block

Parameter
Type
Required
Description

archive

filePath

Yes*

Path to zip archive if using archived template.

template_uid

string

Yes*

Reference to saved template UID.

content

string

Yes*

HTML content of the campaign.

inline_css

yes/no

Yes

Enable/disable inline CSS.

plain_text

string

No

Manually set plain text version or leave null.

auto_plain_text

yes/no

Yes

Automatically generate plain text.

*At least one of archive, template_uid, or content must be provided.


⚙️ Options Block

Parameter
Type
Description

url_tracking

yes/no

Enable/disable URL tracking.

json_feed

yes/no

Enable/disable JSON feed.

xml_feed

yes/no

Enable/disable XML feed.

plain_text_email

yes/no

Send email as plain text.

email_stats

string

Optional: Send campaign stats to this email.

autoresponder_event

string

Values: AFTER-SUBSCRIBE, AFTER-CAMPAIGN-OPEN.

autoresponder_time_unit

string

Time unit: minute, hour, day, etc.

autoresponder_time_value

integer

Interval value for autoresponder.

autoresponder_open_campaign_id

integer

Campaign ID to link with for open-event responders.

cronjob

string

Cron syntax for recurring campaigns.

cronjob_enabled

integer

1 (enabled) or 0 (disabled).


🔐 Authorization Header


💻 PHP Example


📦 Sample JSON Response