TribeArc Mail API

TribeArc Mail's API is based on simple HTTP POST. Use the API to integrate TribeArc programmatically with your website or application.


This method allows you to create, send or schedule a campaign.

URL
https://mail.tribearc.com/api/campaigns/create.php


PARAMETERS (POST)

  1. api_key your API key, available in Settings.
  2. from_name the 'From name' of your campaign
  3. from_email the 'From email' of your campaign
  4. reply_to the 'Reply to' of your campaign
  5. title the 'Title' of your campaign
  6. subject the 'Subject' of your campaign
  7. plain_text the 'Plain text version' of your campaign (optional)
  8. html_text the 'HTML version' of your campaign
  9. list_ids Required only if you set send_campaign to 1 and no segment_ids are passed in. List IDs should be single or comma-separated. The encrypted & hashed ids can be found under View all lists section named ID.
  10. segment_ids Required only if you set send_campaign to 1 and no list_ids are passed in. Segment IDs should be single or comma-separated. Segment ids can be found in the segments setup page.
  11. exclude_list_ids Lists 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)
  12. exclude_segments_ids Segments to exclude from your campaign. Segment IDs should be single or comma-separated. Segment ids can be found in the segments setup page. (optional)
  13. brand_id Required only if you are creating a 'Draft' campaign (send_campaign set to 0 or left as default). Brand IDs can be found under 'Brands' page named ID
  14. query_string eg. Google Analytics tags (optional)
  15. track_opens Set to 0 to disable, 1 to enable and 2 for anonymous opens tracking.
  16. track_clicks Set to 0 to disable, 1 to enable and 2 for anonymous clicks tracking.
  17. send_campaign Set to 1 if you want to send the campaign as well and not just create a draft. Default is 0.
  18. schedule_date_time Campaign 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.
  19. schedule_timezone Eg. 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with schedule_date_time parameter. 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

This method allows you to send or schedule bulk emails (this will also create a list from the emails passed and allows for personalization).

URL
https://mail.tribearc.com/api/campaigns/send_email.php


PARAMETERS (POST)

  1. api_key your API key, available in Settings.
  2. from_name the 'From name' of your campaign
  3. from_email the 'From email' of your campaign
  4. reply_to the 'Reply to' of your campaign
  5. title the 'Title' of your campaign
  6. subject the 'Subject' of your campaign
  7. plain_text the 'Plain text version' of your campaign (optional)
  8. html_text the 'HTML version' of your campaign (To use personlization, include tags like this e.g [Name] [Email])
  9. emails List of emails you want to send this campaign to. (To use personalization send emails separated with pipes, e.g 'ope | [email protected], jame | [email protected], titi | [email protected]')
  10. brand_id Required only if you are creating a 'Draft' campaign (send_campaign set to 0 or left as default). Brand IDs can be found under 'Brands' page named ID
  11. query_string eg. Google Analytics tags (optional)
  12. track_opens Set to 0 to disable, 1 to enable and 2 for anonymous opens tracking.
  13. track_clicks Set to 0 to disable, 1 to enable and 2 for anonymous clicks tracking.
  14. send_campaign Set to 1 if you want to send the campaign as well and not just create a draft. Default is 0.
  15. cc Include additional emails as copy. If multiple emails, make them comma separated
  16. bcc Include additional emails as blind copy. If multiple emails, make them comma separated
  17. schedule_date_time Campaign 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.
  18. schedule_timezone Eg. 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with schedule_date_time parameter. 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: Unable to create campaign

Error: Unable to create and send campaign

Error: Unable to schedule campaign

Error: Unable to calculate totals

Error: Schedule_date_time is invalid

This method allows you to send mail immediately to one recipient. Useful for OTP, verification mails etc.

URL
https://mail.tribearc.com/api/campaigns/send_now.php


PARAMETERS (POST)

  1. api_key your API key, available in Settings.
  2. from_name the 'From name' of your campaign (optional)
  3. from_email the 'From email' of your campaign (optional)
  4. reply_to the 'Reply to' of your campaign (optional)
  5. subject the 'Subject' of your campaign (optional)
  6. plain_text the 'Plain text version' of your campaign (optional)
  7. html_text the 'HTML version' of your campaign
  8. emails A single email you want to send to. (Only one recipient email is expected) (optional)
  9. send_campaign Set to 1 if you want to send the campaign as well and not just create a draft. Default is 0.
  10. brand_id Required only if you are creating a 'Draft' campaign (send_campaign set to 0 or left as default). Brand IDs can be found under 'Brands' page named ID
  11. query_string eg. Google Analytics tags (optional)
  12. track_opens Set to 0 to disable, 1 to enable and 2 for anonymous opens tracking.
  13. track_clicks Set to 0 to disable, 1 to enable and 2 for anonymous clicks tracking.
  14. cc Include additional emails as copy. If multiple emails, make them comma separated
  15. bcc Include additional emails as blind copy. If multiple emails, make them comma separated
  16. schedule_date_time Campaign 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.
  17. schedule_timezone Eg. 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with schedule_date_time parameter. TribeArc will use your default timezone if this parameter is empty.
  18. attachments (Optional parameter) to attach files to your Campaign

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: Unable to create campaign

Error: Unable to create and send campaign

Error: Unable to schedule campaign

Error: Unable to calculate totals

Error: Schedule_date_time is invalid

This method allows you to send sms to DND numbers instantly. Useful for OTP, verification codes etc.

URL
https://mail.tribearc.com/api/sms/send_now.php


PARAMETERS (POST)

  1. api_key your API key, available in Settings.
  2. from the Company's name (We Show 'MAlert' by default because of DND). You should include your company's name in the message body instead.
  3. to the recipient's telephone number
  4. >
  5. message The actual message you intend to send. Include your company name at the beginnnig or end of your message. (Max lenght is 159)

RESPONSE (Plain text)

Success: Message Successful

Error: No data passed

Error: API key not passed

Error: Invalid API key

Error: From name not passed

Error: To Phone number not passed

Error: Message is empty

Error: Phone number must be between 11 to 14 digits long, use international format (+23470345xxxxx)

Error: Message too long. Max of 159 characters

This method allows you to get sms units left.

URL
https://mail.tribearc.com/api/sms/get_balance.php


PARAMETERS (POST)

  1. api_key your API key, available in Settings.

RESPONSE (Plain text)

Success: Message Successful

Error: API key not passed

Error: Invalid API key