Table of Contents:
Table of Contents minLevel 2
Intro
Info |
---|
The Mailing API gives you access to all your mailing campaigns in your account. |
Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used.
Methods Summary
GET /api/mailings/<Campaign ID>
Description
This method fetches a single mailing, including email messages, segments and distribution.
...
Campaign Status Codes
Status | Code |
---|---|
NEW | 60001 |
SCHEDULED | 60002 |
IN_PROGRESS | 60003 |
COMPLETED | 60004 |
ERROR | 60005 |
CANCELLED | 60006 |
DELETED | 60007 |
COMPLETED_WITH_ERRORS | 60008 |
ON_HOLD | 60009 |
STOPPED | 60010 |
GET /api/mailings
Description
This method gives collection of campaigns in response.
...
Optional int
limit
Optional int
POST /api/mailings
Description
This method creates a new mailing campaign. If "schedule_date" is provided (as Unix timestamp), campaign will be scheduled. Otherwise if none provided it will launch immediately.
...
Campaign type (campaign/split)
splitdescription
Required string
The campaign description. For your use only
split_type
Optional string
Split campaign type (email/esp/subject)
description
Required string
The campaign description. For your use only
has_winner_settings
Optional boolean : True or False
True if A/B winner split campaign needs to be scheduled.
"winner_is_quota_percent" - Optional int - 1 to 100
"winner_quota_value" - Optional int - 1 to 100
"winner_conversion_field" - Required when "has_winner_settings" is True - string - unique_opens / unique_clicks
"winner_send_after_hours" - Required when "has_winner_settings" is True - int - Up to and not more than 24 hours
time_to_send_config
Optional object
...
- 400 - Invalid data in request
403 - Permission error
404 - Campaign not found
PUT /api/mailings/<Campaign ID>
Description
This method updates an existing mailing campaign. If schedule_date is provided (as Unix timestamp), campaign will be scheduled.
...
- 400 - Invalid data in request
403 - Permission error
404 - Campaign not found
PUT /api/mailings/<Campaign ID>/abort
Description
This method is used to toggle campaign status On Hold / Stopped / In Progress.
...
403 - Permission error
404 - Campaign not found
PUT /api/mailings/<Campaign ID>/cancel
Description
This method is used to cancel/delete an existing mailing campaign.
...
403 - Permission error
404 - Campaign not found
PUT /api/mailings/<Campaign ID>/unschedule
Description
This method is used to Un-schedule a campaign. This will set the campaign status to "New".
...
403 - Permission error
404 - Campaign not found
PUT /api/mailings/<Campaign ID>/revive
Description
This method Revives a canceled/deleted campaign.
Additional Examples
Request Example - Regular campaign request sample with ESP connection/domain distribution
...