fbpx

Add Emercury to Your Website or App

Create integrations that connect Emercury to a CMS, 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 a few 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.

Add Emercury to Your Website or App

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 ="12345ABCD EF67890GHIJK"></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.

addCampaign

addCampaign 7988 246 Campaign name Some Name test@test.com test@test.com some html

Recipient First Name ]]>
some text

Recipient First Name ]]>
text,html Recipient First Name ]]> 19 1 On On Off On FFA true true 1 2 true 03/14/2012 1:15PM
Required Fields: • message_type • html _body • audiences • campaign_name • subject • cat_id • reply_to --- 11111 Response with schedule: 11111 12345 Response with preview: 11111 *HTML *html – Encoded Html source Response with test sending: 11111 success In Queue Response with real sending: 11111 success In Queue Error Responses: Required filed is empty Required filed is empty Required filed is empty Required filed is empty Required filed is empty Message type must be html, text or text,html Required filed is empty Required filed is empty Audiences 99999 not found Audiences 99998 not found suppressions 9997 not found Nonexistent category Is not valid email address Is not valid email address Please fill schedule_date field Wrong date format, must be mm/dd/yyyy Please fill schedule_time field Wrong time format, examples: 1:00AM, 3:15AM, 12:30PM, 10:45PM Error occured during saving a schedule

addCampaign

Request

<?xml version="1.0"?>
<request>
<user mail="test@test.com" API_key="12345ABCD EF67890GHIJK" />
<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>
test@test.com
</from_email>
<reply_to>
test@test.com
</reply_to>
<html_body>
<![CD ATA[
<p>some html </p> <var nametype="user_field_1">Recipient First 
Name</var>
]]>
</html_body>
<text_body>
<![CD ATA[
<p>some text</p> <var nametype="user_field_1">Recipient First 
Name</var>
]]>
</text_body>
<message_type>
text,html
</message_type>
<subject>
<![CD ATA[
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>
<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>
</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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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/X MLSchema -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>
Emercury. All Rights Reserved © Copyright 2002-2020
Memberships
Partners