Send Email to Existing List(s)
This method allows you to create, send or schedule a campaign.
URL
https://mail.tribearc.com/api/campaigns/create.php
PARAMETERS (POST)
- api_keyyour API key, available in Settings.
- from_namethe 'From name' of your campaign
- from_emailthe 'From email' of your campaign
- reply_tothe 'Reply to' of your campaign
- titlethe 'Title' of your campaign
- subjectthe 'Subject' of your campaign
- plain_textthe 'Plain text version' of your campaign (optional)
- html_textthe 'HTML version' of your campaign
- list_idsRequired only if you set- send_campaignto- 1and no- segment_idsare passed in. List IDs should be single or comma-separated. The encrypted & hashed ids can be found under View all lists section named ID.
- segment_idsRequired only if you set- send_campaignto- 1and no- list_idsare passed in. Segment IDs should be single or comma-separated. Segment ids can be found in the segments setup page.
- exclude_list_idsLists to exclude from your campaign. List IDs should be single or comma-separated. The encrypted & hashed ids can be found under View all lists section named ID. (optional)
- exclude_segments_idsSegments to exclude from your campaign. Segment IDs should be single or comma-separated. Segment ids can be found in the segments setup page. (optional)
- brand_idRequired only if you are creating a 'Draft' campaign (- send_campaignset to 0 or left as default). Brand IDs can be found under 'Brands' page named ID
- query_stringeg. Google Analytics tags (optional)
- track_opensSet to- 0to disable,- 1to enable and- 2for anonymous opens tracking.
- track_clicksSet to- 0to disable,- 1to enable and- 2for anonymous clicks tracking.
- send_campaignSet to- 1if you want to send the campaign as well and not just create a draft. Default is- 0.
- schedule_date_timeCampaign will be scheduled if a valid date/time is passed. Date/time format eg. June 15, 2021 6:05pm. The minutes part of the time has to be in increments of- 5, eg. 6pm, 6:05pm, 6:10pm, 6:15pm.
- schedule_timezoneEg. 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with- schedule_date_timeparameter. TribeArc will use your default timezone if this parameter is empty.
RESPONSE (Plain text)
Success: Campaign created
Success: Campaign created and now sending
Success: Campaign scheduled
Error: No data passed
Error: API key not passed
Error: Invalid API key
Error: From name not passed
Error: From email not passed
Error: Reply to email not passed
Error: Subject not passed
Error: HTML not passed
Error: List or segment ID(s) not passed
Error: One or more list IDs are invalid
Error: One or more segment IDs are invalid
Error: List or segment IDs does not belong to a single brand
Error: Brand ID not passed
Error: Unable to create campaign
Error: Unable to create and send campaign
Error: Unable to schedule campaign
Error: Unable to calculate totals
CLICK TO TRY ON POSTMAN