This API is designed to interact between Emercury Mailing System and Emercury clients to simplify posting contacts/subscribers to your lists.
For Developers
Please use this API URL to send your requests: https://api.emercury.net/api-json.php
Request settings: (Allows up to 180,000 emails per hour)
1 Request per second
Up to 50 contacts per request
Test Scenario (This is not a real account or API Key)
Here is a common authorization request:
Mail is your account email address
API Key is the key provided to your account
UpdateSubscribers is the method of adding and updating subscribers. You will add this first
Parameters will be the start of where you will be entering the parameters you are uploading.
{"audience_id":"123456","date_format_id":"1","subscriber":[{"email":"[email protected]","optin_date":"05/11/2018","optin_ip":"10.10.10.10","optin_website":"www.yourwebsite.com","first_name":"John","last_name":"Doe","user_field_5":"Seattle","state":"Washington"},
Audience_id is your list ID and can be found in your account under Lists as shown here
In my example I use 123456
Next is the date_format_id. This is the format of your optin date. This is important.
Format id: 1 is mm/dd/yyyy
Here are all the formats
"df_id","format"
"1","mm/dd/yyyy"
"2","mm-dd-yyyy"
"3","mm.dd.yyyy"
"4","mm/dd/yy"
"5","mm-dd-yy"
"6","mm.dd.yy"
"7","dd/mm/yyyy"
"8","dd-mm-yyyy"
"9","dd.mm.yyyy"
"10","dd/mm/yy"
"11","dd-mm-yy"
"12","dd.mm.yy"
"13","yyyy/mm/dd"
"14","yyyy-mm-dd"
"15","yyyy.mm.dd"
"16","yy/mm/dd"
"17","yy-mm-dd"
"18","yy.mm.dd"
"19","mon dd yyyy (e.g. sep 1 2012)"
"20","mon-dd-yyyy (e.g. apr-12-2012)"
"21","month dd yyyy (e.g. September 1 2012)"
"22","month-dd-yyyy (e.g. April-12-2012)"
"23","dd mon yyyy (e.g. 1 sep 2012)"
"24","dd-mon-yyyy (e.g. 12-apr-2012)"
"25","dd month yyyy (e.g. 1 September 2012)"
"26","dd-month-yyyy (e.g. 12-April-2012)"
"28","mm/dd/yyyy hh:mm:ss"
Next part will be the subscriber info so we will add “subscriber” then bracket it off as shown here - "subscriber":[
Now we will start with the email address and enter parameter “email” {"email":"[email protected]",
Here I am adding the email address [email protected]
Next we have the optin date. As a reminder this needs to match the optin date format we entered above. We will start with the parameter “optin_date” and enter the date to follow the mm/dd/yyyy format because earlier we use date_format_id:1
"optin_date":"05/11/2018",
Next we will have the optin ip. We will start with the parameter “optin_ip” and the enter the optin ip adress.
"Optin_ip":"10.10.10.10",
Next we have the optin website or source url. We will start with the parameter “optin_website”
"optin_website":"www.yourwebsite.com",
Next we have first name. We will start with the parameter “first_name” or “user_field_1” (Note: We have some friendly names for some variables and for first name we provide that. In later releases we will allow for friendly names for all parameters)
"first_name":"John",
Or
"user_field_1":"John",
Next we have last name. We will start with parameter “last_name” or “user_field_2” (Note: This is another variable we have a friendly name for)
"last_name":"Doe",
Or
"user_field_2":"Doe",
Next we have city. We will start with parameter “user_field_5”
"user_field_5":"Seattle",
Next we have state. We will start with parameter “state” (Note: this is another variable we have a friendly name for)
"state":"Washington"},
To create custom variables or to view variable names you can login to your panel and go to Assets - Fields Manager and you will see the page below. You can customize up to 30 fields and use the variable name listed under the Variable Name column.
If you are looking to add a second email address simply start from email again as shown below (just remember to add the , in between):
"parameters":{"audience_id":"46280","date_format_id":"1","subscriber":[{"email":"[email protected]","optin_date":"05/11/2018","optin_ip":"10.10.10.10","optin_website":"www.yourwebsite.com","first_name":"John","last_name":"Doe","user_field_5":"Seattle","state":"Washington"},{"email":"[email protected]","optin_date":"04/11/2018","optin_ip":"20.20.20.20","optin_website":"www.yourwebsite.com","first_name":"John","last_name":"Smith","user_field_5":"Brooklyn","state":"New York"}
Lastly you will want to remember to close out all of your brackets. Here is how you would close out of the 2 emails
"parameters":{"audience_id":"46280","date_format_id":"1","subscriber":[{"email":"[email protected]","optin_date":"05/11/2018","optin_ip":"10.10.10.10","optin_website":"www.yourwebsite.com","first_name":"John","last_name":"Doe","user_field_5":"Seattle","state":"Washington"},
{"email":"[email protected]","optin_date":"04/11/2018","optin_ip":"20.20.20.20","optin_website":"www.yourwebsite.com","first_name":"John","last_name":"Smith","user_field_5":"Brooklyn","state":"New York"}]}}}