Skip to main content
All CollectionsIntegrations
Emercury API (XML)
Emercury API (XML)

The Emercury API allows you to sync your database with Emercury for better list, campaign, and stats management.

Michael Batalha avatar
Written by Michael Batalha
Updated over 9 months ago


Add Emercury to Your Website or App

Create integrations that connect Emercury to a CMS, CRM, blog, shopping cart, and more. Our API offers in-depth documentation, a download section for various wrappers, and how-to documents. The majority of data and functionality within our web application is accessible, so the integration possibilities are endless.

Not a programmer? Here are options that don't involve using our API directly:

What You Can Do with the API

The Emercury API allows you to sync your database with Emercury for better list and campaign management. Create client portals, add a subscribe form to your checkout page, segment campaigns based on purchase history, link campaign stats to your database, sync email activity with your database, and more.

Table of Contents

Emercury API ver 3.6.0

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://api.emercury.net/api.php

API Request Settings

Scenario 1  (Allows up to 180,000 emails per hour)

  • 1 Request per second

  • Up to 50 contacts per request

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

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="[email protected]" 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

getSuppressions() - 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:[email protected]/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:[email protected]/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


getAutomations() - returns list of automation id's.

getAutomationMessages() - returns list of message id's and friendly names associated with the message id's.
Required parameters:

automation_id - the automation's ID. 

getAutomationMessageStats() - returns list of stats of the message from the automation. Stats included are:
Subscriber ID
Email Address
Status of Message
Sent Time
Number of Opens
Time of Open
Number of Clicks
Time of Click
Server Response
IP Address of Contact

Required parameters:

automation_id - the automations's ID.
message_id - the id of the message inside the automation.

getTags() - return all tags

getSubscriberTags() - return all tags by subscriber
Required parameters:

email - email address of subscriber

addSubscriberTag() - assign tags to subscriber
Required parameters:

email - email address of subscriber
tags - tag name ( comma separator)

deleteSubscriberTag() - delete tags from subscriber
Required parameters:

email - email address of subscriber
tags - tag name ( comma separator)

getSubscribersByTags() - return subscribers by tag name
Required parameters:

audience_id - email address of subscriber
tag - tag name

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

To include segments use the following parameter:

parameter: include_segments (0 or 1) (true or false) (yes or no) (on or off)

response parameter: is_segment (0 or 1) (true or false) (yes or no) (on or off)

Note: the include_segments parameter is not a required parameter.

Request

<?xml version="1.0" encoding="utf-8"?>
<request>
<method>GetAudiences</method>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<parameters>
<include_segments>no</include_segments>
</parameters>
</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="[email protected]" 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>[email protected]</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>[email protected]</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="[email protected]" API_key="12345ABCDEF67890GHIJK "></user>
 <parameters>
 <audience_id>12345</audience_id>
 <date_format_id>1</date_format_id>
 <subscriber>
 <email>[email protected]</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>
<tags>tag1,tag2</tags>
 </subscriber>
 <subscriber>
  <email>[email protected]</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>[email protected]</email>
 <optin_date>5/6/2012</optin_date>
 <optin_ip></optin_ip>
 <optin_website></optin_website>
 <first_name>Noname</first_name>
<tags>tag1,tag2</tags>
 <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>[email protected]</email>
<message>Subscriber updated successfully.</message>
</subscriber>
<subscriber>
<email>[email protected]</email>
<message>Subscriber updated successfully.</message>
</subscriber>
<subscriber>
<email>[email protected]</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>[email protected]</email>
<error>Missing "optin_date" field</error>
</subscriber>
<subscriber>
<email>[email protected]</email>
<error>"optin_date" field must be filled</error>
</subscriber>
<subscriber>
<email>[email protected]</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="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK " />
<method>addSuppressionContacts</method>
<parameters>
<suppression_id>
<id>192</id>
</suppression_id>
<contacts>
<email>[email protected]</email>
</contacts>
<contacts>
<email>[email protected]</email>
</contacts>
<contacts>
<email>[email protected]</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="[email protected]" 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="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK " />
<method>deleteSubscriber</method>
<parameters>
<audience_id>7676</audience_id>
<subscribers>
<email>[email protected]</email>
</subscribers>
<subscribers>
<email>[email protected]</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>[email protected]</email>
<message>Subscriber deleted</message>
</subscriber>
<subscriber>
<email>[email protected]</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="[email protected]" 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>[email protected]</email>
</unsubscribedEmail>
<unsubscribedEmail>
<email>[email protected]</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="[email protected]" 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>[email protected]</email>
</complaintsEmail>
<complaintsEmail>
<email>[email protected]</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="[email protected]" 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>[email protected]</email>
</softBounce>
<softBounce>
<email>[email protected]</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="[email protected]" 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>[email protected]</email>
</hardBounce>
<hardBounce>
<email>[email protected]</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="[email protected]" 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>[email protected]</email>
</Open>
<Open>
<email>[email protected]</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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getDisabled</method>
</request>

Or with campaign_id parameter:

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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>
[email protected]
</email>
</disabledEmail>
</disabledEmails>
</emercurymailAPI>

getReportsID

<?xml version="1.0"?>
<request>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getReportsID</method>
</request>

or

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getCustomFields</method>
</request>

To get available fields:

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>createFilter</method>
<parameters>
<name>Test</name>
<e_mail>
<equal>
[email protected]
</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="[email protected]" />
<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>
</category>
<category>
<id>11</id>
<name>Agriculture and Food Services</name>
</category>
</emercurymailAPI>

getSuppressions

<?xml version="1.0"?>
<request>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getSuppressions</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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getPreview</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">
<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="[email protected]" 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>[email protected]</email>
</subscriber>
<subscriber>
<id>2</id>
<email>[email protected]</email>
</subscriber>
</subscribers>
</emercurymailAPI>

campaignSendTest

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>addCampaign</method>
<parameters>
<audiences>
<id>7988</id>
</audiences>
<suppressions>
<id>246</id>
</suppressions>
<campaign_name>
Campaign name
</campaign_name>
<from_name>
Some Name
</from_name>
<from_email>
[email protected]
</from_email>
<reply_to>
[email protected]
</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>
[email protected]
</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>
</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">
<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"?>
<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>

<?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>
<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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignsInformation</method>
<parameters>
<campaign_id>
11111
</campaign_id>
</parameters>
</request>

or

<?xml version="1.0"?>
<request>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignsInformation</method>
</request>

or

<?xml version="1.0"?>
<request>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getCampaignsInformation</method>
<parameters>
<filter_date_from>mm/dd/yyyy</filter_date_from>
<filter_date_to>mm/dd/yyyy</filter_date_to>
</parameters>
</request>

this will get the campaign added date within a range. You don't need to use the filter_Date_to if you want to just use the filter_date_from.

or

<?xml version="1.0"?> 
<request>
<user mail="[email protected]" API_key="12345ABCDEF67890GHIJK" /> <method>getCampaignsInformation</method>
<parameters>
<schedule_date_from>mm/dd/yyyy hh:mm tt</schedule_date_from>
<schedule_date_to>mm/dd/yyyy hh:mm tt</schedule_date_to>
</parameters>
</request>

this will get the schedules running between the from and to date entered.

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>
<list_id>0</list_id>
<user_tpl_id>0</user_tpl_id>
<campaign_name>Test</campaign_name>
<from_email>[email protected]</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>

or

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaigns>
<campaign>
<campaign_id>11111</campaign_id>
<campaign_name>Test</campaign_name>
<from_email>[email protected]</from_email>
<from_name>Some Name</from_name>
<reply_to>[email protected]</reply_to>
<subject>Subject</subject>
<track_customer_activity>0</track_customer_activity>
<added>09/09/2011</added>
<message_type>html</message_type>
<deleted>0</deleted>
<cat_id>0</cat_id>
</campaign>
</campaigns>
</emercurymailAPI>

getCampaignStats

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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>[email protected]</email>
<email_status>3</email_status>
<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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>getConfirmed</method>
<parameters>
<audience_id>1234</audience_id>
</parameters>
</request>

Response:

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<id>1111111</id>
<email>[email protected]</email>
</subscriber>
<subscriber>
<id>1111112</id>
<email>[email protected]</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>

sendCampaign

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>addSchedule</method>
<parameters>
<campaign_id>11111</campaign_id>
<schedule_date>
03/14/2012
</schedule_date>
<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>

addAutoresponder

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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>
[email protected]
</from_email>
<reply_to>
[email protected]
</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>
<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
• 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>Non-existing campaign</campaign_id>
</error>
<error>
<cat_id>Non-existing category</cat_id>
</error>
<error>
<condition>Must be greater, less or equal</condition>
</error>
<error>
<audience_id>Non-existing audience</audience_id>
</error>
<error>
<reply_to>Email address is not valid</reply_to>
</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="[email protected]" 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>
<tags>7</tags>
</fields>
<subscribers>
[email protected],"01/01/1970","10.10.10.10","http://site.com","First name","Last name", "tag1,tag2"
[email protected],"01/01/1970","10.10.10.10","http://site.com","First name","Last name", "tag1,tag2"
</subscribers>
</parameters>
</request>

ImportSubscribers (from file)

<?xml version="1.0" encoding="utf-8"?>
<request>
<user mail="[email protected]" 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>
<last_name>Last Name</last_name>
<optin_website>Website</optin_website>
<tags>Tags</tags>
</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>
<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>
<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">
<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="[email protected]" 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>
<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>
<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>
</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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>importSuppressionContacts</method>
<parameters>
<suppression_id>
12345
</suppression_id>
<md5_check>
false
</md5_check>
<contactsCSV>
[email protected]
[email protected]
[email protected]
</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:

<?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="[email protected]" API_key="12345ABCDEF67890GHIJK" />
<method>emailsUnsubscribe</method>
<parameters>
<emailsCSV>
[email protected]
[email protected]
[email protected]
</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>
</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="[email protected]" 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>[email protected]</email>
</unsubscribedEmail>
<unsubscribedEmail>
<email>[email protected]</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>
<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

Request:

<?xml version="1.0"?>
<request>
<user mail="[email protected]" 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>
[email protected]
</from_email>
<reply_to>
[email protected]
</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
</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>
[email protected]
</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:

<?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>
</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="[email protected]" 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>
<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>

addAutomation

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>updateAutomationStatus</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<name>Automation Name</name>
<audience_id>50530</audience_id>
<condition>optin_date</condition>
</parameters>
</request>

  • Note: Currently the only trigger supported is "New Subscribers"
    The conditions for this trigger are by 'Added_Date' or 'Optin_date'

  • Check back for new supported triggers in the near future.

Required Fields:
• name
• audience_id
• condition

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<campaign_id>158752</campaign_id>
<message>Email Automation successfully saved</message>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<audience_id>Must be a number</audience_id>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<condition>Please set correct value</condition>
</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>

addAutomationMessage

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>addAutomationGlobalMessageSettings</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<friendly_name>Automation Message Name</friendly_name>
<subject><![CDATA[some text <var nametype="user_field_1">Recipient First Name</var>]]></subject>
<html_body><![CDATA[<p>some html</p> <var nametype="user_field_1">Recipient First Name</var>]]></html_body>
<automation_id>65</automation_id>
<from_name>
<name>Mark</name>
</from_name>
<from_name>
<name>John</name>
</from_name>
<message_type>text,html</message_type>
<track_customer_activity>true</track_customer_activity>
</parameters>
</request>

  • this kind of message does not work with conditions

Required Fields:
• friendly_name

• automation_id
• subject
• html_body

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Automation message successfully saved</message>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<from_name>Do not use the @ sign in your from name, this is against RFC compliance</from_name>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<subject>Required field is empty</subject>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<automation_id>You must enter correct automation id</automation_id>
</error>
</errors>
</emercurymailAPI>

<?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>
</errors>
</emercurymailAPI>

addAutomationGlobalMessageSettings

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>addAutomationGlobalMessageSettings</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<campaign_name>Campaign Automation</campaign_name>
<sender_profile_id>50530</sender_profile_id>
<cat_id>65</cat_id>
<automation_id>65</automation_id>
<from_name>
<name>Mark</name>
</from_name>
<from_name>
<name>John</name>
</from_name>
<ssl_enable>true</ssl_enable>
</parameters>
</request>

Required Fields:
• campaign_name

• automation_id
• sender_profile_id
• cat_id
• from_name

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Automation global message settings successfully saved</message>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<from_name>Do not use the @ sign in your from name, this is against RFC compliance</from_name>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<sender_profile_id>sender_profile_id field must be filled</sender_profile_id>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<automation_id>You must enter correct automation id</automation_id>
</error>
</errors>
</emercurymailAPI>

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

getAutomations

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getAutomations</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<automations>
<automation>
<automation_id>1</automation_id>
<automation_name>Automation 1</automation_name>
</automation>
<automation>
<automation_id>2</automation_id>
<automation_name>Automation 2</automation_name>
</automation>
</automations>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message>No Automations Found</message>
</error>
</errors>
</emercurymailAPI>

updateAutomationStatus

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>updateAutomationStatus</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<automation_id>123456</automation_id>
<enable>false</enable>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<message>Automation status successfully saved</message>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message>You must enter the correct automation id</mesasge>
</error>
</errors>
</emercurymailAPI>

getAutomationMessages

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getEAMessages</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<automation_id>123456</automation_id>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<messages>
<message>
<message_id>1</message_id>
<friendly_name>Message 1</friendly_name>
</message>
<message>
<message_id>2</message_id>
<friendly_name>Message 2</friendly_name>
</message>
</messages>
</emercurymailAPI>

Error Response:

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


<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message>No Messages Found</mesasge>
</error>
</errors>
</emercurymailAPI>

getAutomationMessageStats

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getEAMessageStats</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<automation_id>123456</automation_id>
<message_id>123</message_id>
<date_from>04/19/2020</date_from>
<date_to>04/20/2020</date_to>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<subscriber_id>12345678</subscriber_id>
<email>[email protected]</email>
<status>Sent</status>
<sent_time>2020-04-18 16:24:20</sent_time>
<opens_number>1</opens_number>
<open_time>2020-05-13 10:13:05</open_time>
<clicks_number>1</clicks_number>
<click_time>2020-05-13 10:14:34</click_time>
<server_answer>250 2.0.0 OK</server_answer>
<user_ip>134.24.56.123</user_ip>
<task_id>123546</task_id>
</subscriber>
<subscriber>
<subscriber_id>12345679</subscriber_id>
<email>[email protected]</email>
<status>Soft</status>
<sent_time>2020-04-18 16:24:20</sent_time>
<opens_number>0</opens_number>
<open_time />
<clicks_number />
<click_time />
<server_answer />
<user_ip />
<task_id>123546</task_id>
</subscriber>
</subscribers>
</emercurymailAPI>

Email statuses:

- Starting
- Sending
- Sent
- Soft Bounced
- Hard Bounced
- Unsubscribed
- Complained
- Unknown

Error Response:

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

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

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message>No Tasks Found</mesasge>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<message>No Emails Found</mesasge>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<date_from>Wrong date format, must be mm/dd/yyyy</date_from>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<date_to>Wrong date format, must be mm/dd/yyyy</date_to>
</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>
<date_from>Wrong date format, must be mm/dd/yyyy</date_from>
</error>
<error>
<date_to>Wrong date format, must be mm/dd/yyyy</date_to>
</error>
</errors>
</emercurymailAPI>

getTags

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getTags</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tags>
<tag>
<tag_id>1</tag_id>
<tag_name>movies</tag_name>
</tag>
<tag>
<tag_id>2</tag_id>
<tag_name>books</tag_name>
</tag>
<tag>
<tag_id>3</tag_id>
<tag_name>tv</tag_name>
</tag>
</tags>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No tags found</error>
</errors>
</emercurymailAPI>

getSubscriberTags

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getSubscriberTags</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<subscriber>
<email>[email protected]</email>
</subscriber>
<subscriber>
<email>[email protected]</email>
</subscriber>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<tags>
<tag>
<tag_id>4</tag_id>
<tag_name>text</tag_name>
<tag>
<tag>
<tag_id>5</tag_id>
<tag_name>text2</tag_name>
<tag>
</tags>
</subscriber>
<subscriber>
<email>[email protected]</email>
<tags>
<tag>
<tag_id>4</tag_id>
<tag_name>text</tag_name>
<tag>
</tags>
</subscriber>
</subscribers>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<error>Subscriber with this email address doesn't exist</error>
</subscriber>
</subscribers>
</emercurymailAPI>

addSubscriberTags

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>addSubscriberTags</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<subscriber>
<email>[email protected]</email>
<tags>category,product</tags>
</subscriber>
<subscriber>
<email>[email protected]</email>
<tags>website</tags>
</subscriber>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<message>Tag(s) added</message>
</subscriber>
</subscribers>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<error>Subscriber with this email address doesn't exist</error>
</subscriber>
</subscribers>
</emercurymailAPI>

deleteSubscriberTags

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>addSubscriberTags</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<subscriber>
<email>[email protected]</email>
<tags>category,product</tags>
</subscriber>
<subscriber>
<email>[email protected]</email>
<tags>website</tags>
</subscriber>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<message>Tag(s) deleted</message>
</subscriber>
</subscribers>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</email>
<error>Subscriber with this email address doesn't exist</error>
</subscriber>
</subscribers>
</emercurymailAPI>

getSubscribersByTag

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getSubscribersByTag</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<audience_id>12345</audience_id>
<tag>movies</tag>
</parameters>
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<subscribers>
<subscriber>
<email>[email protected]</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>[email protected]</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>

Error Response:

<?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>

getTrackingCode

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getTrackingCode</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
<parameters>
<create>true</create>
</parameters>
</request>

Required Fields:
• create

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<code>EM-XXXXXXXXXXXXXXXX</code>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>Please upgrade your plan</error>
</errors>
</emercurymailAPI>

<?xml version="1.0" encoding="utf-8"?>
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No code found</error>
</errors>
</emercurymailAPI>

getSenderProfiles

Request:

<?xml version="1.0" encoding="utf-8" ?> 
<request>
<method>getSenderProfiles</method>
<user mail="[email protected]" API_key="abcdefghijklmnopqrstuvwxyz1234567890" />
</request>

Successful Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sender_profiles>
<sender_profile>
<sender_profile_id>1001</sender_profile_id>
<sender_profile_name>sender profile</sender_profile_name>
<from_address_email>[email protected]</from_address_email>
<from_address_status>1</from_address_status>
<reply_to_email>[email protected]</reply_to_email>
<reply_to_status>1</reply_to_status>
<footer_organization_name>mailer</footer_organization_name>
<footer_city>test</footer_city>
<footer_address>test</footer_address>
<domains>
<domain>
<track_domain>track.mailer.co</track_domain>
</domain>
<domain>
<click_domain>url.mailer.net</click_domain>
</domain>
<domain>
<image_domain>img.mailer.net</image_domain>
</domain>
</domains>
</sender_profile>
</sender_profiles>
</emercurymailAPI>

Error Response:

<?xml version="1.0" encoding="utf-8"?> 
<emercurymailAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<error>No profiles found</error>
</errors>
</emercurymailAPI>

End

Did this answer your question?