Emercury API ver 3.5.6

This API is designed to interact between the Emercury Mailing System and Emercury clients to simplify access to contacts and other information.

For Developers

Please use this API url to send your requests: https://panel.emercury.net/api.php

***note: please download the example of the sample API file:

https://panel.emercury.net/files/download.php?sample 

Test Scenario (This is not a real account or API key)
Here is the common authorization request:

<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK"></user>
</request>

– <request> – query container that includes all required fields
– <user> - client's information (email and API key)

To call any function tag <method></method> used.

List of functions:

GetAudiences()
This function doesn't have parameters.

GetSubscribers()
This function has the required parameter audience_id. This will return subscribers only from this audience.

UpdateSubscribers()
This function is used for ADDING subscribers as well as UPDATING subscribers. This
should be used for adding single emails or bulk.

This function has required parameters:
audience_id – id of audience
date_format_id – id of optin date format (use getDateFormats API function to get all date formats)
subscriber->email – email address of subscriber that you want to add/update

There are 4 special fields in the system: optin_date, optin_ip, optin_website, and state. Use their names as shown below.

<optin_ip>xxx.xxx.xxx.xxx</optin_ip>
<optin_date>YYYY-MM-DD</optin_date>
<optin_website>www.example.com</optin_website>
<state>NY</state>


All other user fields should use theso if variable names. They can be found in your Emercury Panel under Assets-> Forms-> Fields Manager, column "Variable Name". 

Here is an example:

<user_field_1>John</user_field_1>
<user_field_2>Smith</user_field_2>


addSuppression()
This function has the required parameter “name”. This function adds a new Suppression list.

addSuppressionContacts()
This function has the required parameter “suppression_id”. This function adds new contacts to your suppression list.

addAudiences()
This function has the required parameter “audience_name”. This function adds a new Audience.

deleteAudiences()
This function has the required parameter “audience_id”. This function deletes an existing Audience.

deleteSubscribers()
For this function you need to point to “audience_id” and subscribers emails.

getReportsID() - this method returns campaign name, campaign ID and tasks Ids for each campaign.
You can pass campaign_id parameter to get reports of certain campaign.

getReportsStats() - this method accepts as a parameter  and return in response these
statistics: Total Emails, Successfully Sent, Soft Bounces, Hard Bounces, Complaints, Total/Unique Opens, Total/Unique Clicks, Forwards, Unsubscribed, Never Mail.

createFilter() - this method creates new filter (segment). Parameters:

<name> - name of the filter
<e_mail> - this parameter is the name of custom field.
Could be any field: <city>, <zip>,
<birthday>...
<equal> - defines if value should equal to some string.
<between_min_and_max> - can be used if you want to limit value
<amount_limit> - amount of emails in this filter
<date> - date added of emails in this filter


getCustomFields() - this method returns list of all active Custom Fields: names and IDs

getCategories() - this method returns categories list

getSuppresions() - this method returns all suppression lists.

getPreview() -this method returns campaign html src code

campaignSendTest() - using this method you can send any campaign (by campaignID) to any test user from your Test Group (by testuserID)

getTestSubscribers() - this method returns all subscribers from Test Group and their Ids.

getCampaignsInformation() - this method returns campaign's information

getCampaignStats() - return campaign’s emails information

getUnsubscribed() - returns list of Unsubscribed emails. Has a required parameter <task_id>

getComplaints() - returns list of Complained emails. Has a required parameter <task_id>

getSoft() - returns list of Soft Bounced emails. Has a required parameter <task_id>

getHard() - returns list of Hard Bounced emails. Has a required parameter <task_id>

getOpens() - returns list of recipients that opened email. Has a required parameter <task_id>

getConfirmed() - return list of Confirmed emails. Has a required parameter <audience_id>.

getDisabled() - return list of Confirmed emails. Can be used with or without parameter
<campaign_id>. If you will use it without parameter you will get the full list of Confirmed emails.

updateCustomFields() - this function updates Custom Fields. In order to do it you should send fieldID and its name.

addCampaign() - this function allows you to add new campaign with all needed parameters. Required Fields: message_type, from_email, html_body, audience_id, campaign_name, subject, cat_id.

You can also limit amount of emails for send using optional pairs of tags: from/to and start/amount like this:

<audiences>
<id>9999</id>
<from>100</from>
<to>500</to>
</audiences>


This method also has optional attribute <advanced_mode>. You can put your email address in this field and it will be used as EMAIL_FROM header of your email. But you should first add and confirm this address in section "Preferences" -> "From Address" of Emercury client's panel.

Function allows to add custom footer for the campaign in tag <custom_footer>.
It has following required tags: <organization_name>, <organization_site>, <address>, <city>, <zip>, <state>, <country>.

And an optional tag that can have absolute path to your logo (keep in mind that image is shown "as it is", without resizing): <path_to_logo>

If you don't want to set default footer, you should not include the whole tag <custom_footer> in your api call. If it is included, then you should fill in data for required fields.

sendCampaign() - this function allows you to send selected campaign right after api call.

addSchedule() - with the help of this function you can schedule any campaign to the date/time you want it to be sent.

Minutes in <schedule_time> tag should be set with a 15-mins period: 00, 15, 30 or 45.
Examples of correct time tag:

<schedule_time>1:15PM</schedule_time>
<schedule_time>2:00AM</schedule_time>
<schedule_time>3:30PM</schedule_time>

Example of incorrect time tag:

<schedule_time>1:50PM</schedule_time>


addAutoresponder() - this function allows to add new autoresponder with all needed parameters.

Tag <ar_type> supports following parameters: added, opted-in, opened, clicked
Required Fields are:
message_type,
html_body,
audience_id,
ar_name, subject,
reply_to,
ar_type,
cat_id,
send_time,
condition,
condition_days,
enable
immediate

ImportSubscribers () - This function is used to import contacts into an audience/list from file uploaded to ftp, from file located on your server or from the xml itself. This should not be used for adding single emails.
This function is for bulk imports only.

Import csv data:
Required tags:

<audience_id>
<date_format_id>
<fields>
<subscribers>

Required fields for tag <fields>:

<email>
<optin_website>
<optin_ip>
<optin_date>

In the <fields> tag you should set order of columns that you will be importing in <subscribers> tag or in csv file.

Please see example for this type of import.
Import from file:
Required tags:

<audience_id>
<date_format_id>
<path>
<fields>

note:
In order to get <date_format_id> Use the API function: getDateFormats().
Links format for tag <path>:

/local/path/somefile.csv
http://somesite.com/path/to/somefile.csv
https://somesite.com/path/to/somefile.csv
ftp://login:pass@someserver.com/path/to/somefile.csv

Please see example for this type of import.

***Note: you will need to request an FTP account in order to use this function.

getDateFormats () - returns available dates formats for optinDate import.

importSuppressionContacts () - allows to import small and large (more than 10,000) number of suppression contacts.

Parameters:

<suppression_id> - ID of the suppression list to import new emails.
<md5_check> (default value: false) - defines if emails are imported in md5 format.
<contactsCSV> - list of emails.

Required Parameters:

<suppression_id>
<contactsCSV> or <path>

Links format for tag <path>:

/local/path/somefile.csv
http://somesite.com/path/to/somefile.csv
https://somesite.com/path/to/somefile.csv
ftp://login:pass@someserver.com/path/to/somefile.csv

Please see example for this type of import.

***Note: you will need to request an FTP account in order to use this function.

emailsUnsubscribe() - this function allows to unsubscribe list of emails.
Required Parameter: <emailsCSV>

getUnsubscribesList() - this function returns all unsubscribed emails within one list. It has a required parameter <audience_id>

updateCampaign() - function allows to change parameters of the campaign
Required parameters:

campaign_id - ID of the campaign to change
audiences - IDs of audiences to be sent on
campaign_name - the name of campaign
from_email - From email setting
reply_to - Reply To email setting
html_body - content of the email
subject - email's subject
cat_id - category ID

getCampaignSchedules() - returns list of schedules for a given campaign
Required parameters:

campaign_id - campaign's ID.
include_old - if set, returns all schedules for the campaign. if not set - returns only future schedules (edited)

Error handling:
For each request system checks required parameters and user’s authentication.
If there is some error it will be in response xml in <error></error> tag.

Examples of Request-Response for each method:

GetAudiences

Request

<?xml version="1.0" encoding="utf-8"?>
<request>
<method>GetAudiences</method>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK "></user>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<audiences>
<audience>
<id>6857</id>
<name>All Subscribers</name>
<size>11</size>
<subscribers_count>Unknown</subscribers_count>
<unsubscribed>Unknown</unsubscribed>
<status>Unknown</status>
</audience>
<audience>
<id>6916</id>
<name>fff</name>
<size>1</size>
<subscribers_count>1</subscribers_count>
<unsubscribed>Unknown</unsubscribed>
<status>Unknown</status>
</audience>
</audiences>
</emercurymailAPI>

GetSubscribers

Request

<?xml version="1.0" encoding="utf-8"?>
<request>
<method>GetSubscribers</method>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK "></user>
<parameters>
<audience_id>12345</audience_id>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>test_subscr1@some.com</email>
<optin_date>2011-05-27</optin_date>
<optin_ip>192.168.0.100</optin_ip>
<optin_website>http://example.com/</optin_website>
<first_name>John</first_name>
<last_name>Smith</last_name>
<city>LA</city>
<state>Unknown</state>
<audience_name>new one</audience_name>
</subscriber>
<subscriber>
<email>test_subscr2@mail.com</email>
<optin_date>2011-05-27</optin_date>
<optin_ip>192.168.0.10</optin_ip>
<optin_website>Unknown</optin_website>
<first_name>David</first_name>
<last_name>Storm</last_name>
<city>New York</city>
<state>NY</state>
<audience_name>new one</audience_name>
</subscriber>
</subscribers>
</emercurymailAPI>

UpdateSubscribers

Note: This function is used for ADDING subscribers as well as UPDATING subscribers. This should be used for adding single emails or bulk.

Request:

<?xml version="1.0" encoding="utf-8"?>
<request>
<method>UpdateSubscribers</method>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK "></user>
<parameters>
<audience_id>12345</audience_id>
<date_format_id>1</date_format_id>
<subscriber>
<email>test_subscr1@some.com</email>
<optin_date>10/31/2012</optin_date>
<optin_ip>192.168.0.100</optin_ip>
<optin_website>http://examplenew.com/</optin_website>
<first_name>Jack</first_name>
<last_name>Hook</last_name>
<city>London</city>
<state></state>
</subscriber>
<subscriber>
<email>test_subscr2@mail.com</email>
<optin_date>4/1/2012</optin_date>
<optin_ip>192.168.0.10</optin_ip>
<optin_website></optin_website>
<first_name>Adam</first_name>
<last_name>Bo</last_name>
<city>New Jersey</city>
<state></state>
</subscriber>
<subscriber>
<email>mail_poi@mai.com</email>
<optin_date>5/6/2012</optin_date>
<optin_ip></optin_ip>
<optin_website></optin_website>
<first_name>Noname</first_name>
<last_name></last_name>
<city>Chicago</city>
<state></state>
</subscriber>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>test_subscr1@some.com</email>
<message>Subscriber updated successfully.</message>
</subscriber>
<subscriber>
<email>test_subscr2@mail.com</email>
<message>Subscriber updated successfully.</message>
</subscriber>
<subscriber>
<email>test_subscr3@mail.com</email>
<message>Subscriber added successfully.</message>
</subscriber>
</subscribers>
</emercurymailAPI>

Error Responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>mail_poi@mai.com</email>
<error>Missing "optin_date" field</error>
</subscriber>
<subscriber>
<email>mail_poi@mai.com</email>
<error>"optin_date" field must be filled</error>
</subscriber>
<subscriber>
<email>mail_poi@mai.com</email>
<error>Optin date is invalid</error>
</subscriber>
</subscribers>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<parameters>Missing "audience_id" parameter</parameters>
</error>
<error>
<parameters>Missing "date_format_id" parameter</parameters>
</error>
<error>
<audience_id>Parameter should be filled</audience_id>
</error>
<error>
<date_format_id>Parameter should be filled</date_format_id>
</error>
<error>
<audience_id>Wrong audience ID</audience_id>
</error>
<error>
<date_format_id>Wrong date format ID</date_format_id>
</error>
</errors>
</emercurymailAPI>

addSuppression

Request:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK "/>
<method>addSuppression</method>
<parameters>
<suppression>
<name>
name1
</name>
</suppression>
<suppression>
<name>
name2
</name>
</suppression>
<suppression>
<name>
name3
</name>
</suppression>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<suppressions>
<suppression>
<name>name1</name>
<message>Suppression List created successful</message>
</suppression>
<suppression>
<name>name2</name>
<error>Suppression List with this name already exists</error>
</suppression>
<suppression>
<name>name3</name>
<error>Suppression List with this name already exists</error>
</suppression>
</suppressions>
</emercurymailAPI>

addSuppressionContacts

Request:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK " />
<method>addSuppressionContacts</method>
<parameters>
<suppression_id>
<id>192</id>
</suppression_id>
<contacts>
<email>test@email.com</email>
</contacts>
<contacts>
<email>tes2t@email.com</email>
</contacts>
<contacts>
<email>test3@email.com</email>
</contacts>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contacts>
<contact>
<message>Import of suppression list started</message>
</contact>
</contacts>
</emercurymailAPI>

addAudiences

Request:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK " />
<method>addAudiences</method>
<parameters>
<audience_name>
<name>test1</name>
</audience_name>
<audience_name>
<name>test2</name>
</audience_name>
<audience_name>
<name>test3</name>
</audience_name>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<audiences>
<audience>
<name>test1</name>
<error>Audience name alraedy exists</error>
</audience>
<audience>
<name>test2</name>
<error>Audience name already exists</error>
</audience>
<audience>
<name>test3</name>
<message>Audience added</message>
</audience>
</audiences>
</emercurymailAPI>

deleteAudiences

Request:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK " />
<method>deleteAudiences</method>
<parameters>
<audience_id>
<id>7722</id>
</audience_id>
<audience_id>
<id>7721</id>
</audience_id>
<audience_id>
<id>7719</id>
</audience_id>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<audiences>
<audience>
<id>7722</id>
<error>Audience doesnt exists</error>
</audience>
<audience>
<id>7721</id>
<error>Audience doesnt exists</error>
</audience>
<audience>
<id>7719</id>
<message>Audience deleted</message>
</audience>
</audiences>
</emercurymailAPI>

deleteSubscribers

Request:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK " />
<method>deleteSubscriber</method>
<parameters>
<audience_id>7676</audience_id>
<subscribers>
<email>webcraft@mail.com</email>
</subscribers>
<subscribers>
<email>letmetouch@mail.com</email>
</subscribers>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>letmetouch@mail.com</email>
<message>Subscriber deleted</message>
</subscriber>
<subscriber>
<email>webcraft@mail.com</email>
<error>Subscriber with this email doesnt exists</error>
</subscriber>
</subscribers>
</emercurymailAPI>

getUnsubscribed

To get all unsubscribes use this code:
Request:

<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getUnsubscribed</method>
<parameters>
<task_id>123456</task_id>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<unsubscribedEmails>
<unsubscribedEmail>
<email>test@test.com</email>
</unsubscribedEmail>
<unsubscribedEmail>
<email>test1@test.com</email>
</unsubscribedEmail>
</unsubscribedEmails>
</emercurymailAPI>

Error responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing task_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
17
<error>
<task_id>Parameter should be filled</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Wrong task ID</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No emails found</error>
</errors>
</emercurymailAPI>

These functions work the same way:
• getComplaints
• getSoft
• getHard
• getOpens
• getDisabled
• getUnsubscribed

getComplaints

Request:

<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getComplaints</method>
<parameters>
<task_id>123456</task_id>
</parameters>
</request>


Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<complaintsEmails>
<complaintsEmail>
<email>test@test.com</email>
</complaintsEmail>
<complaintsEmail>
<email>test1@test.com</email>
</complaintsEmail>
</complaintsEmails>
</emercurymailAPI>


Error responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing task_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Parameter should be filled</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Wrong task ID</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No emails found</error>
</errors>
</emercurymailAPI>

getSoft

Request:

<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getSoft</method>
<parameters>
<task_id>123456</task_id>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<softBounces>
<softBounce>
<email>test@test.com</email>
</softBounce>
<softBounce>
<email>test1@test.com</email>
</softBounce>
</softBounces>
</emercurymailAPI>

Error Responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing task_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Parameter should be filled</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Wrong task ID</task_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No emails found</error>
</errors>
</emercurymailAPI>

getHard

Request:

<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getHard</method>
<parameters>
<task_id>123456</task_id>
</parameters>
</request>


Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<hardBounces>
<hardBounce>
<email>test@test.com</email>
</hardBounce>
<hardBounce>
<email>test1@test.com</email>
</hardBounce>
</hardBounces>
</emercurymailAPI>


Error responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing task_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Parameter should be filled</task_id>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Wrong task ID</task_id>
</error>
</errors>
</emercurymailAPI>

getOpens

Request:

<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getOpens</method>
<parameters>
<task_id>123456</task_id>
</parameters>
</request>


Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Opens>
<Open>
<email>test@test.com</email>
</Open>
<Open>
<email>test1@test.com</email>
</Open>
</Opens>
</emercurymailAPI>


Error responses:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing task_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Parameter should be filled</task_id>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<task_id>Wrong task ID</task_id>
</error>
</errors>
</emercurymailAPI>

getDisabled

<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getDisabled</method>
</request>

Or with campaign_id parameter:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getDisabled</method>
<parameters>
<campaign_id>15555</campaign_id>
</parameters>
</request>


Response:

<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<disabledEmails>
<disabledEmail>
<email>
test3@test.com
</email>
</disabledEmail>
</disabledEmails>
</emercurymailAPI>

getReportsID

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getReportsID</method>
</request>

or

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getReportsID</method>
<parameters>
<campaign_id>8888</campaign_id>
</parameters>
</request>


Response:

<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Reports>
<Report>
<campaign_name>
Test Compaign
</campaign_name>
<campaign_id>
8888
</campaign_id>
<task_ids>
<task_id>
<id>
11901
</id>
</task_id>
<task_id>
<id>
13746
</id>
</task_id>
</task_ids>
</Report>
<Report>
<campaign_name>
Test Compaign
</campaign_name>
<campaign_id>
8888
</campaign_id>
<task_ids>
<task_id>
<id>
11901
</id>
</task_id>
</task_ids>
</Report>
</emercurymailAPI>

getReportsStats

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getReportsStats</method>
<parameters>
<task_ids>
<id>15858</id>
</task_ids>
<task_ids>
<id>15828</id>
</task_ids>
<task_ids>
<id>15838</id>
</task_ids>
<task_ids>
<id>15848</id>
</task_ids>
</parameters>
</request>


Response:

<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Tasks>
<Task>
<soft_bounces>
12
</soft_bounces>
<hard_bounces>
912
</hard_bounces>
<complaints>
0
</complaints>
<unique_opens>
14
</unique_opens>
25
<total_opens>
17
</total_opens>
<unique_clicks>
0
</unique_clicks>
<total_clicks>
0
</total_clicks>
<forwards>
0
</forwards>
<unsubscribed>
8
</unsubscribed>
<never_mail>
0
</never_mail>
<task_status>
0
</task_status>
</Task>
<Task>
<soft_bounces>
68
</soft_bounces>
<hard_bounces>
0
</hard_bounces>
<complaints>
1
</complaints>
<unique_opens>
229
</unique_opens>
<total_opens>
285
</total_opens>
<unique_clicks>
0
</unique_clicks>
<total_clicks>
0
</total_clicks>
<forwards>
</forwards>
<unsubscribed>
3
</unsubscribed>
26
<never_mail>
0
</never_mail>
<task_status>
0
</task_status>
</Task>

getCustomFields

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCustomFields</method>
</request>

To get available fields:

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCustomFields</method>
<parameters>
<setted>
true
</setted>
</parameters>
</request>


Response:

<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fields>
<Field>
<db_field_id>
13538
</db_field_id>
<name>
First Name
</name>
</Field>
<Field>
<db_field_id>
13539
</db_field_id>
<name>
27
Last Name
</name>
</Field>
<Field>
<db_field_id>
13540
</db_field_id>
<name>
Gender
</name>
</Field>
<Field>
<db_field_id>
13541
</db_field_id>
<name>
Birthday
</name>
</Field>
<Field>
<db_field_id>
13542
</db_field_id>
<name>
City
</name>
</Field>
<Field>
<db_field_id>
13543
</db_field_id>
<name>
Zip
</name>
</Field >
<Field>
<db_field_id>
13544
</db_field_id>
<name>
Field 7
</name>
</Field>
<Field>
<db_field_id>
13545
</db_field_id>
<name>
Field 8
</name>
28
</Field>
<Field>
<db_field_id>
13546
</db_field_id>
<name>
Field 9
</name>
</Field>
</Fields>
</emercurymailAPI>

updateCustomFields

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>updateCustomFields</method>
<parameters>
<field>
<id>13566</id>
<name>testing</name>
</field>
<field>
<id>13567</id>
<name>testing2</name>
</field>
</parameters>
</request>


Response:

<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fields>
<Field>
<id>
13566
</id>
<message>
Custom field updated
</message>
</Field>
<Field>
<id>
13567
</id>
<message>
Custom field updated
</message>
</Field>
</Fields>
</emercurymailAPI>

createFilter

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>createFilter</method>
<parameters>
<name>Test</name>
<e_mail>
<equal>
test2@test.com
</equal>
<between_min_and_max>
<value1>
200
</value1>
<value2>
300
</value2>
</between_min_and_max>
</e_mail>
<amount_limit>
<from>10</from>
<to>20</to>
</amount_limit>
<date>
<from>2011-08-09</from>
<to>2012-08-09</to>
</date>
</parameters>
</request>


If there is no audience with this name, audience will be created. To get list of fields use function getCustomFields with parameter. Replace all spaces with _

Response:

<emercurymailAPI ">xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Filters>
<Filter>
<message>
Audience updated
</message>
</Filter>
<Filter>
<message>
Condition email : equal added
</message>
</Filter>
<Filter>
<message>
Condition email : between_min_and_max added
</message>
</Filter>
<Filter>
<message>
Condition Date added
</message>
</Filter>
<Filter>
<message>
Condition Limit amount added
</message>
</Filter>
</Filters>
</emercurymailAPI>


getCategories
<?xml version="1.0"?>
<request>
<user API_key="12345ABCDEF67890GHIJK" mail="test@test.com" />
<method>getCategories</method>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<categorys>
<category>
<id>10</id>
<name>Agency: Design, Creative, or Web</name>
</category>
<category>
<id>8</id>
<name>Education and Training</name>
31
</category>
<category>
<id>11</id>
<name>Agriculture and Food Services</name>
</category>
</emercurymailAPI>
getSuppresions
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getSuppresions</method>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<suppressions>
<suppression>
<id>246</id>
<name>test</name>
</suppression>
<suppression>
<id>254</id>
<name>test3</name>
</suppression>
<suppression>
<id>260</id>
<name>test2</name>
</suppression>
</suppressions>
</emercurymailAPI>
getPreview
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getPreview</method>
<parameters>
<campaign_id>11111</campaign_id>
</parameters>
</request>
32
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<preview>
*HTML
</preview>
</emercurymailAPI>
*html – Encoded Html source
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Nonexistent campaign</error>
</emercurymailAPI>
getTestSubscribers
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getTestSubscribers</method>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<id>1</id>
<email>test@test.com</email>
</subscriber>
<subscriber>
<id>2</id>
<email>test2@test.com</email>
</subscriber>
</subscribers>
</emercurymailAPI>
33
campaignSendTest
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>campaignSendTest</method>
<parameters>
<campaign_id>11111</campaign_id>
<send_test_subscriber>
<id>
2
</id>
</send_test_subscriber>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<send_test_result>success</send_test_result>
<send_test_status>In Query</send_test_status>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Nonexistent campaign</error>
</emercurymailAPI>
addCampaign
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>addCampaign</method>
<parameters>
<audiences>
<id>7988</id>
</audiences>
<suppressions>
<id>246</id>
</suppressions>
34
<campaign_name>
Campaign name
</campaign_name>
<from_name>
Some Name
</from_name>
<from_email>
test@test.com
</from_email>
<reply_to>
test@test.com
</reply_to>
<html_body>
<![CDATA[
<p>some html</p> <var nametype="user_field_1">Recipient First
Name</var>
]]>
</html_body>
<text_body>
<![CDATA[
<p>some text</p> <var nametype="user_field_1">Recipient First
Name</var>
]]>
</text_body>
<message_type>
text,html
</message_type>
<subject>
<![CDATA[
some text <var nametype="user_field_1">Recipient First Name</var>
]]>
</subject>
<cat_id>
19
</cat_id>
<is_wz>
1
</is_wz>
<delivery_reminder>
On
</delivery_reminder>
<permission_reminder>
On
</permission_reminder>
<track_customer_activity>
Off
</track_customer_activity>
<ff_link>
On
</ff_link>
35
<ff_link_text>
FFA
</ff_link_text>
<preview>
true
</preview>
<send_test>
true
</send_test>
<send_test_subscriber>
<id>
1
</id>
</send_test_subscriber>
<send_test_subscriber>
<id>
2
</id>
</send_test_subscriber>
<send_now>
true
</send_now>
<schedule_date>
03/14/2012
</schedule_date>
<schedule_time>
1:15PM
</schedule_time>
<ga_track>
On
</ga_track>
<ga_name>
GA_holidays
</ga_name>
<advanced_mode>
myemail@mydomain.com
</advanced_mode>
<custom_footer>
<organization_name>org name</organization_name>
<organization_site>org site</organization_site>
<address>address</address>
<city>city</city>
<zip>12345</zip>
<state>state</state>
<country>US</country>
<path_to_logo>https://www.example.com/images/image.png</path_to_logo>
</custom_footer>
</parameters>
36
</request>
Required Fields:
• message_type
• html_body
• audiences
• campaign_name
• subject
• cat_id
• reply_to
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaign_id>11111</campaign_id>
</emercurymailAPI>
Response with schedule:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaign_id>11111</campaign_id>
<schedule_id>12345</schedule_id>
</emercurymailAPI>
Response with preview:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaign_id>11111</campaign_id>
<preview>
*HTML
</preview>
</emercurymailAPI>
*html – Encoded Html source
Response with test sending:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaign_id>11111</campaign_id>
<send_test_result>success</send_test_result>
<send_test_status>In Queue</send_test_status>
</emercurymailAPI>
Response with real sending:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
37
<campaign_id>11111</campaign_id>
<send_result>success</send_result>
<send_status>In Queue</send_status>
</emercurymailAPI>
Error Responses:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Required filed is empty</audience_id>
</error>
<error>
<campaign_name>Required filed is empty</campaign_name>
</error>
<error>
<subject>Required filed is empty</subject>
</error>
<error>
<from_email>Required filed is empty</from_email>
</error>
<error>
<message_type>Required filed is empty</message_type>
</error>
<error>
<message_type>Message type must be html, text or text,html</message_type>
</error>
<error>
<cat_id>Required filed is empty</cat_id>
</error>
<error>
<html_body>Required filed is empty</html_body>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audiences>Audiences 99999 not found</audiences>
</error>
<error>
<audiences>Audiences 99998 not found</audiences>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
38
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<suppressions>suppressions 9997 not found</suppressions>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<cat_id>Nonexistent category</cat_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<reply_to>Is not valid email address</reply_to>
</error>
<error>
<from_email>Is not valid email address</from_email>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<schedule_date>Please fill schedule_date field</schedule_date>
</error>
<error>
<schedule_date>Wrong date format, must be mm/dd/yyyy</schedule_date>
</error>
<error>
<schedule_time>Please fill schedule_time field</schedule_time>
</error>
<error>
<schedule_time>Wrong time format, examples: 1:00AM, 3:15AM, 12:30PM,
10:45PM</schedule_time>
</error>
<error>
<schedule>Error occured during saving a schedule</schedule>
</error>
</errors>
</emercurymailAPI>
39
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Please use either Start/Amount or From/To as attributes for audience 14794</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Please use either Start/Amount or From/To as attributes for audience 14794</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Please use either Start/Amount or From/To as attributes for audience 14794</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Tag From cant be larger than To for audience 14794</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Only integers allowed in Start/Amount and From/To attributes 14794</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<custom_footer>Please fill required fields</custom_footer>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<custom_footer>Please fill organization_name field</custom_footer>
</error>
<error>
<custom_footer>Please fill organization_site field</custom_footer>
</error>
<error>
40
<custom_footer>Please fill address field</custom_footer>
</error>
<error>
<custom_footer>Please fill city field</custom_footer>
</error>
<error>
<custom_footer>Please fill zip field</custom_footer>
</error>
<error>
<custom_footer>Please fill state field</custom_footer>
</error>
<error>
<custom_footer>Please fill country field</custom_footer>
</error>
</errors>
</emercurymailAPI>
getCampaignsInformation
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignsInformation</method>
<parameters>
<campaign_id>
11111
</campaign_id>
</parameters>
</request>
or
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignsInformation</method>
</request>
To get information about all campaigns use this method without campaign_id parameters.
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaigns>
<campaign>
<campaign_id>11111</campaign_id>
<user_id>830</user_id>
41
<list_id>0</list_id>
<user_tpl_id>0</user_tpl_id>
<campaign_name>Test</campaign_name>
<from_email>test@test.com</from_email>
<from_name>Some Name</from_name>
<reply_to></reply_to>
<subject>Subject</subject>
<ff_link>0</ff_link>
<track_customer_activity>0</track_customer_activity>
<number_of_resend_errors>10</number_of_resend_errors>
<active_campaign>1</active_campaign>
<added>2011-09-09</added>
<message_type>html</message_type>
<deleted>0</deleted>
<ff_link_text>Forward to Friends</ff_link_text>
<subscribe_link>0</subscribe_link>
<subscribe_link_text></subscribe_link_text>
<permission_reminder>0</permission_reminder>
<delivery_reminder>0</delivery_reminder>
<cat_id>0</cat_id>
</campaign>
</campaigns>
</emercurymailAPI>
getCampaignStats
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignStats</method>
<parameters>
<campaign_id>11111</campaign_id>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tasks>
<task>
<db_subscriber_id>79</db_subscriber_id>
<email>test4@test.net</email>
<email_status>3</email_status>
42
<opens_number>0</opens_number>
<sent_time>2011-04-21 13:16:58</sent_time>
<open_time>0000-00-00 00:00:00</open_time>
<forward_to_email></forward_to_email>
<server_answer>smtp_communicate:529: Connect error: @domain=test.net,
ip=[1.2.3.4]</server_answer>
<locked>2011-04-21 13:15:57</locked>
<resend>10</resend>
<ip>209.11.216.62</ip>
<thread_id>140448679049488</thread_id>
<status>Soft</status>
<task_id>13671</task_id>
</task>
</tasks>
</<emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>No reports</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Empty campaign id</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>No campaign with this id</error>
</emercurymailAPI>
getConfirmed
<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getConfirmed</method>
<parameters>
<audience_id>1234</audience_id>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
43
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<id>1111111</id>
<email>mail@mail.com</email>
</subscriber>
<subscriber>
<id>1111112</id>
<email>mail@mail.com</email>
</subscriber>
</subscribers>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<fields>Missing "audience_id" field</fields>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Field should be filled</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Wrong Audience ID</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No emails found</error>
</errors>
</emercurymailAPI>
44
sendCampaign
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>sendCampaign</method>
<parameters>
<campaign_id>11111</campaign_id>
</parameters>
</request>
Required Fields:
• campaign_id
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<send_result>success</send_result>
<send_status>In Query</send_status>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Nonexistent campaign</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Campaign ID is empty</error>
</emercurymailAPI>
addSchedule
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>addSchedule</method>
<parameters>
<campaign_id>11111</campaign_id>
<schedule_date>
03/14/2012
</schedule_date>
45
<schedule_time>
1:15PM
</schedule_time>
</parameters>
</request>
Required Fields:
• campaign_id
• schedule_date
• schedule_time
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<schedule_id>123456</schedule_id>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Nonexistent campaign</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Error occured during saving a schedule</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Please fill schedule_date field</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Wrong date format, must be mm/dd/yyyy</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Please fill schedule_time field</error>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<error>Wrong time format, examples: 1:00AM, 3:15AM, 12:30PM, 10:45PM</error>
</emercurymailAPI>
46
addAutoresponder
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>addAutoresponder</method>
<parameters>
<audience_id>
123456
</audience_id>
<ar_name>
Autoresponder Name
</ar_name>
<from_name>
Some Name
</from_name>
<from_email>
test@test.com
</from_email>
<reply_to>
test@test.com
</reply_to>
<html_body>
<![CDATA[
<p>some html</p> <var nametype="user_field_1">Recipient First
Name</var>
]]>
</html_body>
<text_body>
<![CDATA[
<p>some text</p> <var nametype="user_field_1">Recipient First
Name</var>
]]>
</text_body>
<message_type>
text,html
</message_type>
<subject>
<![CDATA[
some text <var nametype="user_field_1">Recipient First Name</var>
]]>
</subject>
<delivery_reminder>
on
</delivery_reminder>
<permission_reminder>
off
</permission_reminder>
47
<ff_link>
</ff_link>
<ff_link_text>
FFA
</ff_link_text>
<cat_id>21</cat_id>
<send_time>
12PM
</send_time>
<ar_type>
opting-in
</ar_type>
<campaign_id>
123456
</campaign_id>
<condition>
greater
</condition>
<condition_days>
1
</condition_days>
<enable>
false
</enable>
<immediate>
true
</immediate>
</parameters>
</request>

  • if you selected ar_type= "opened" or "clicked", then campaign_id attribute is required.

Required Fields:
• message_type
• html_body
• audience_id
• ar_name
• subject
48
• reply_to
• ar_type
• cat_id
• send_time
• condition
• condition_days
• enable
• immediate
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ar_id>123456</ar_id>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message_type>Message type must be html, text or text,html</message_type>
</error>
<error>
<enable>Must be true or false</enable>
</error>
<error>
<send_time>Wrong time format, examples: 1AM, 12PM</send_time>
</error>
<error>
<ar_type>Must be opting-in, last_open or last_click</ar_type>
</error>
<error>
<campaign_id>Campaign ID must be filled</campaign_id>
</error>
<error>
<campaign_id>Unexisting campaign</campaign_id>
</error>
<error>
<cat_id>Unexisting category</cat_id>
</error>
<error>
<condition>Must be greater, less or equal</condition>
</error>
<error>
<audience_id>Unexisting audience</audience_id>
</error>
<error>
<reply_to>Email address is not valid</reply_to>
49
</error>
<error>
<from_email>Email address is not valid</from_email>
</error>
</errors>
</emercurymailAPI>
importSubscribers
Note: This function is only used for bulk import and not single email adds or adding subscribers
from forms. Use the UpdateSubscribers function for single email imports/adds.
ImportSubscribers (csv data)
<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>importSubscribers</method>
<parameters>
<audience_id>12345</audience_id>
<date_format_id>1</date_format_id>
<fields>
<email>1</email>
<optin_website>4</optin_website>
<optin_ip>3</optin_ip>
<optin_date>2</optin_date>
<first_name>5</first_name>
<last_name>6</last_name>
</fields>
<subscribers>
mail@mail.com,"01/01/1970","10.10.10.10","http://site.com","First name","Last name"
mail2@mail.com,"01/01/1970","10.10.10.10","http://site.com","First name","Last name"
</subscribers>
</parameters>
</request>
ImportSubscribers (from file)
<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>importSubscribers</method>
<parameters>
<audience_id>12345</audience_id>
<date_format_id>1</date_format_id>
<path>http://somesite.com/example.csv</path>
<fields>
<email>E-mail</email>
<optin_date>Date</optin_date>
<optin_ip>IP</optin_ip>
<first_name>First Name</first_name>
50
<last_name>Last Name</last_name>
<optin_website>Website</optin_website>
</fields>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<message>Subscribers uploaded successfully and started importing</message>
</subscribers>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<parameters>Please add one of the required parameters: "path" or
"subscribers"</parameters>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<parameters>Missing "audience_id" parameter</parameters>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Parameter should be filled</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
51
<fields>Missing "email" field</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<email>Field should be filled</email>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<email>This field is already defined, please use another field</email>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<some_field>Wrong field name, please make sure you are using existent
userfields</some_field>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<email>Value should be integer</email>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
52
<fields>Order of fields in csv and "fields" is incorrect</fields>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>You reached the size limit of your purchased plan. Upgrade your plan to import additional
subscribers</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Can't get remote file or file is empty</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>You exceeded filesize limit(20MB). Please use smaller file.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Undefined header name in downloaded file "Some header"</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>File was uploaded partially, please try to upload again.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>File cannot be written on server.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
53
<errors>
<error>Uploading error, please try again later.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Error reading a file.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Cannot move uploaded file to user directory.</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<errors>
<date_format_id>Wrong date format ID</date_format_id>
</errors>
</errors>
</emercurymailAPI>
getDateFormats
<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getDateFormats</method>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<formats>
<format>
<id>1</id>
<template>mm/dd/yyyy</template>
</format>
<format>
<id>2</id>
<template>mm-dd-yyyy</template>
</format>
54
<format>
<id>3</id>
<template>mm.dd.yyyy</template>
</format>
<format>
<id>4</id>
<template>mm/dd/yy</template>
</format>
<format>
<id>5</id>
<template>mm-dd-yy</template>
</format>
<format>
<id>6</id>
<template>mm.dd.yy</template>
</format>
<format>
<id>7</id>
<template>dd/mm/yyyy</template>
</format>
<format>
<id>8</id>
<template>dd-mm-yyyy</template>
</format>
<format>
<id>9</id>
<template>dd.mm.yyyy</template>
</format>
<format>
<id>10</id>
<template>dd/mm/yy</template>
</format>
<format>
<id>11</id>
<template>dd-mm-yy</template>
</format>
<format>
<id>12</id>
<template>dd.mm.yy</template>
</format>
<format>
<id>13</id>
<template>yyyy/mm/dd</template>
</format>
<format>
<id>14</id>
<template>yyyy-mm-dd</template>
</format>
<format>
<id>15</id>
55
<template>yyyy.mm.dd</template>
</format>
<format>
<id>16</id>
<template>yy/mm/dd</template>
</format>
<format>
<id>17</id>
<template>yy-mm-dd</template>
</format>
<format>
<id>18</id>
<template>yy.mm.dd</template>
</format>
<format>
<id>19</id>
<template>mon dd yyyy (e.g. sep 1 2012)</template>
</format>
<format>
<id>20</id>
<template>mon-dd-yyyy (e.g. apr-12-2012)</template>
</format>
<format>
<id>21</id>
<template>month dd yyyy (e.g. September 1 2012)</template>
</format>
<format>
<id>22</id>
<template>month-dd-yyyy (e.g. April-12-2012)</template>
</format>
<format>
<id>23</id>
<template>dd mon yyyy (e.g. 1 sep 2012)</template>
</format>
<format>
<id>24</id>
<template>dd-mon-yyyy (e.g. 12-apr-2012)</template>
</format>
<format>
<id>25</id>
<template>dd month yyyy (e.g. 1 September 2012)</template>
</format>
<format>
<id>26</id>
<template>dd-month-yyyy (e.g. 12-April-2012)</template>
</format>
<format>
<id>0</id>
<template>Other</template>
</format>
56
</formats>
</emercurymailAPI>
Error Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No date formats found</error>
</errors>
</emercurymailAPI>
importSuppressionContacts
<?xml version="1.0" encoding="utf-8" ?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>importSuppressionContacts</method>
<parameters>
<suppression_id>
12345
</suppression_id>
<md5_check>
false
</md5_check>
<contactsCSV>
test@email.com
tes2@email.com
test3@email.com
</contactsCSV>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8" ?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<suppressions>
<message>Suppression contacts uploaded successfully and started importing</message>
</suppressions>
</emercurymailAPI>
Error Responses:
57
<?xml version="1.0" encoding="utf-8" ?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<parameters>Missing "suppression_id" parameter</parameter>
</error>
<error>
<parameters>Missing "contactsCSV" parameter</parameter>
</error>
<error>
<suppression_id>Parameter should be filled</suppression_id>
</error>
<error>
<md5_check>Parameter should be filled</md5_check>
</error>
<error>
<contactsCSV>Parameter should be filled</contactsCSV>
</error>
<error>
<suppression_id>Wrong suppression List ID</suppression_id>
</error>
<error>
<md5_check>Wrong field value, please use one of the valid values: true, false, 0, 1</md5_check>
</error>
</errors>
</emercurymailAPI>
emailsUnsubscribe
Request:
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>emailsUnsubscribe</method>
<parameters>
<emailsCSV>
test@email.com
test2@email.com
test3@email.com
</emailsCSV>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Unsubscribe emails uploaded successfully and started importing</message>
58
</emercurymailAPI>
Error responses:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing emailsCSV parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<emailsCSV>Parameter should be filled</emailsCSV>
</error>
</errors>
</emercurymailAPI>
getUnsubscribesList
Request:
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getUnsubscribesList</method>
<parameters>
<audience_id>12345</audience_id>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<unsubscribedEmails>
<unsubscribedEmail>
<email>test@email.net</email>
</unsubscribedEmail>
<unsubscribedEmail>
<email>test2@email.com</email>
</unsubscribedEmail>
</unsubscribedEmails>
</emercurymailAPI>
Error Responses:
59
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>No emails found</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Missing audience_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Parameter should be filled</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Wrong audience ID</audience_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Audience does not exist</audience_id>
</error>
</errors>
</emercurymailAPI>
updateCampaign
60
Request:
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>addCampaign</method>
<parameters>
<campaign_id>
123456
</capaign_id>
<audiences>
<id>1234</id>
<id>5678</id>
</audiences>
<suppressions>
<id>123</id>
<id>456</id>
</suppressions>
<campaign_name>
Campaign name
</campaign_name>
<from_name>
Some Name
</from_name>
<from_email>
some@email.com
</from_email>
<reply_to>
some@email.com
</reply_to>
<html_body>
<![CDATA[
<h1>Your html</h1>
]]>
</html_body>
<text_body>
<![CDATA[
Your text
]]>
</text_body>
<message_type>
text,html
</message_type>
<subject>
Your subject
</subject>
<cat_id>
11
</cat_id>
<delivery_reminder>
On
61
</delivery_reminder>
<permission_reminder>
On
</permission_reminder>
<track_customer_activity>
On
</track_customer_activity>
<ff_link>
On
</ff_link>
<ff_link_text>
Forward text link
</ff_link_text>
<send_test>
true
</send_test>
<send_test_subscriber>
<id>
1
</id>
<id>
2
</id>
</send_test_subscriber>
<send_now>
true
</send_now>
<ga_track>
On
</ga_track>
<ga_name>
GA_campaign_name
</ga_name>
<advanced_mode>
myemail@mydomain.com
</advanced_mode>
<custom_footer>
<organization_name>Your organization's name</organization_name>
<organization_site>Your organization's site</organization_site>
<address>Your organization's address</address>
<city>City</city>
<zip>12345</zip>
<state>State</state>
<country>US</country>
<path_to_logo>http://www.example.com/path/to/image.jpg</path_to_logo>
</custom_footer>
</parameters>
</request>
Response:
62
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Campaign updated successfully</message>
</emercurymailAPI>
Response with real sending:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Campaign updated successfully</message>
<send_result>Success</send_result>
<send_status>In Queue</send_status>
</emercurymailAPI>
Response with test sending:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Campaign updated successfully</message>
<send_test_result>Success</send_test_result>
<send_test_status>In Queue</send_test_status>
</emercurymailAPI>
Error Responses:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<parameters>Missing "name_of_parameter" parameter</parameters>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<name_of_parameter>Parameter should be filled</name_of_parameter>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<campaign_id>Wrong campaign ID</campaign_id>
</error>
<error>
<cat_id>Wrong category ID</cat_id>
</error>
<error>
<audiences>Some of audiences have wrong id</audiences>
63
</error>
<error>
<suppressions>Some of audiences have wrong id</suppressions>
</error>
<error>
<reply_to>The email is not valid</reply_to>
</error>
<error>
<from_email>The email is not valid</from_email>
</error>
</errors>
</emercurymailAPI>
getCampaignSchedules
Request:
<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignSchedules</method>
<parameters>
<campaign_id>123456</campaign_id>
<include_old>1</include_old>
</parameters>
</request>
Response:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<schedules>
<schedule>
<schedule_id>1234567</schedule_id>
<added>2015-01-01</added>
<schedule_date>2015-01-02</schedule_date>
<schedule_time>01:00 pm</schedule_time>
</schedule>
</schedules>
Response with no schedules:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<schedules>
<message>No schedules found</message>
</schedules>
</emercurymailAPI>
Error responses:
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
64
<error>Missing campaign_id parameter</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<campaign_id>Parameter should be filled</campaign_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<include_id>Parameter should be filled</include_id>
</error>
</errors>
</emercurymailAPI>
<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<campaign_id>Wrong campaign ID</campaign_id>
</error>
</errors>
</emercurymailAPI>

Did this answer your question?