Dr. Mailer API Documentation

Welcome to the Dr. Mailer REST API specification.

Welcome to the Dr. Mailer REST API specification.

API Base URL: https://api.doctor-mailer.com/

Autopilot

Autopilot is our mailing system. Here you can find all the functions to control it.

Create a new list

POST
/autopilot_create_list

Create a new list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
list_name string The list name to create required
location string The location of the new list required
value string The file handler required
secret string The secret required
Response Body
                                        
Success {"[FILE-NAME]":{"status":"Success","name":"UK_MyList_1","load_id":"QTExNjJJMzAq"}}
Failure {"[FILE-NAME]":{"status":"Error:Invalid file"}}

Get Load List Status

POST
/autopilot_load_list_status

Get the loading status of a given list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The load ID required
secret string The secret required
Response Body
                                        
Success {"QTExNjJJMzAq":{"status":"done"}}
Failure {"QTExNjJJMzAq":{"status":"Error:Can't check load status for QTExNjJJMzAq"}}

Delete a List

POST
/autopilot_delete_list

Permanently delete a list

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The list name to delete required
secret string The secret required
Response Body
                                        
Success {"ENG_FILE_NAME_20":1}
Failure {"ENG_FILE_NAME_20":0}

Unsubscribe a lead from all your lists

POST
/autopilot_unsubscribe_all

Unsubscribe a given lead from all the lists

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to unsubscribe required
secret string The secret required
Response Body
                                        
Success {"from@domain.com":1} #<= can be any number higher than zero
Failure {"from@domain.com":0}

Resubscribe to all lists

POST
/autopilot_resubscribe_all

Resubscrube a lead to all the lists it was part of.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to resubscribe required
secret string The secret required
Response Body
                                        
Success {"from@domain.com":1} #<= can be any number higher than zero
Failure {"from@domain.com":0}

Subscribe an email address to a list

POST
/autopilot_subscribe

Subscrube a lead to a specific list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to subscribe required
list_name string The name of the list required
secret string The secret required
Response Body
                                        
Success {"from@domain.com":"OK Subscribed to: LIST"}
Failure {"from@domain.com":"OK Already subscribed to: LIST"}

Get a List

POST
/autopilot_get_list

Get a list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The list name required
search string Search specific leads optional
records_start int The record number to start from optional
page_size int How many leads to fetch optional
secret string The secret required
Response Body
                                        
Success {"ENG_LIST_NAME":{"Data":[["1","from@domain.com"," ","2019-01-07 14:21:07","Dave"," "," "," "," "," "," "," "," ","No","No","Yes","No","No"],["2","fron2@domain.com"," ","2019-01-07 14:21:07","David"," "," "," "," "," "," "," "," ","No","No","Yes","No","No"]],"RecordsFiltered":"2","TotalRecords":"2"}}
Failure {"ENG_LIST_NAME":[],"RecordsFiltered":-1,"TotalRecords":-1}}

Get Lists

POST
/autopilot_get_lists

Get lists.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
secret string The secret required
Response Body
                                        
Success {"Results":["ENG_LIST_NAME1","ENG_LIST_NAME2"]}

Get Lists Per Location

POST
/autopilot_get_lists_per_location

Get all the lists per the given location.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The location required
search string Search specific lists optional
secret string The secret required
Response Body
                                        
Success {"UK":["UK_LIST_NAME1"]}
Failure {"UK":[]}

Get List Stats

POST
/autopilot_get_list_stats

Get stats for a given list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The list name required
secret string The secret required
Response Body
                                        
Success {"UK_LIST_NAME1":{"master":"2","success":"0","failed":"0","deferral":"0","clicked":"0","opened":"0","unsubscribed":"0"}}
Failure {"UK_LIST_NAME1":{"master":-1,"success":-1,"failed":-1,"deferral":-1,"clicked":-1,"opened":-1,"unsubscribed":-1}}

Register a Webform Lead

POST
/autopilot_register_webform_lead

Register a lead to a Webform.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to register required
formid int The form ID to register the email to required
personalizations json Personalization fields names are set per user
so please contact us to get them for your user
Example:{"first_name":"Dave","last_name":"Grohl"}
optional
secret string The secret required

Get a Webform Optin Info

POST
/autopilot_get_optin_info

Get info about a given Webform optin lead.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to register required
formid int The form ID to register the email to required
secret string The secret required

Create a Creative

POST
/autopilot_create_creative

Create a new creative.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The email-address to register required
creative_name string The name to give to the new creative required
subject string The subject line required
from_name string The from name required
from_address string The from email address required
replyto_name string The replyto name required
subject string The subject line required
replyto_address string The replyto email address required
content string The content - HTML vertion required
content_text string The content - TEXT vertion optional
location string The location of the new creative required
extra_link_params string The params to bind to the use click optional
secret string The secret required
Response Body
                                        
Success {"ENG_CREATIVE_NAME":{"status":"Success","name":"ENG_SYSTEM_CREATIVE_NAME"}}

Delete a Creative

POST
/autopilot_delete_creative

Delete a creative.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The creative (name) to delete required
secret string The secret required
Response Body
                                        
Success {"ENG_SYSTEM_CREATIVE_NAME":1}
Failure {"ENG_SYSTEM_CREATIVE_NAME":0}

Get Creatives

POST
/autopilot_get_creatives

Get Creatives.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
secret string The secret required
Response Body
                                        
Success {"Results":{"1":"ENG_CREATIVE_NAME1","2":"ENG_CREATIVE_NAME1"}}

Get Creatives Per Location

POST
/autopilot_get_creatives_per_location

Get creatives per the given location.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The location of the creatives required
search string Search specific leads optional
secret string The secret required
Response Body
                                        
Success {"ENG":["ENG_SYSTEM_CREATIVE_NAME1","ENG_SYSTEM_CREATIVE2_NAME"]}
Failure {"DE":[]}

Get Creative

POST
/autopilot_get_creative

Get a creative content.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The creative name required
secret string The secret required
Response Body
                                        
Success {"ENG_SYSTEM_CREATIVE_NAME":{"headers":[...],"body":"Html content","clickthru":"","status":"1"}}
Failure {"ENG_SYSTEM_CREATIVE_NAME":{"headers":-1,"body":-1,"clickthru":-1,"status":"ERROR:Can't find creative ENG_DrMailer_Test"}}

Get Tunnels

POST
/autopilot_get_tunnels

Get the tunnels list.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
secret string The secret required
Response Body
                                        
Success {"Results":{"1":{"id":"1","desc":"TUNNEL_NAME","speed":3000,"publish_date":"2018-04-08 08:33:31"}}}

Get Top Tunnels Per Location

POST
/autopilot_get_top_tunnels_per_location

Get tunnels ordered by success rate per location.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The location required
secret string The secret required
Response Body
                                        
Success {"UK":{"1":{"id":"1","desc":"TUNNEL1","num_of_ips":6,"success_rate":98,"total_score":91,"speed":3000,"publish_date":"2018-11-10 11:33:03"},"2":{"id":"2","desc":"TUNNEL1","num_of_ips":6,"success_rate":91,"total_score":86,"speed":3000,"publish_date":"2018-10-15 15:03:02"}}}

Get Tunnel Speed

POST
/autopilot_get_tunnel_speed

Get the recommended speed of a tunnel.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
tunnel_id int The ID of the tunnel required
secret string The secret required
Response Body
                                        
Success {"Results":3000}
Failure {"Results":-1}

Send Campaign

POST
/autopilot_send_campaign

Send a new campaign.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
tunnel_id int The ID of the tunnel required
list_name string The name of the list required
creative_name string The name of the creative required
throttle_per_hour int Number of messages per hour required
mailing_name string The name of the campaign optional
segment int The segment ID to send. Default is ALL.
(1==ALL,2==Viewed,3==Clicked)
optional
sched_datetime string Date-time to sent the campaign (default "" == now) optional
secret string The secret required
Response Body
                                        
Success {"Results":"70435"}
Failure {"Results":"ERROR:Failed to campaign: No such list-ZZ_SAGI_TEST2_20"}
{"Results":"ERROR:Failed to campaign: Unknown creative"}

Send Oneoff

POST
/autopilot_send_one_off_campaign

Send a "oneoff" - an email to a specific email address (not a list).

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
creative_name string The name of the creative required
tracking_url string The URL you want Dr Mailer to send you
notifications about events
required
value string The email address to send the email to required
tunnel_id int The ID of the tunnel optional
personalizations json Personalization fields names are set per user
so please contact us to get them for your user
Example:{"first_name":"Dave","last_name":"Grohl"}
optional
secret string The secret required
Response Body
                                        
Success {"to@domain.com":"11f130399de2902e1bb56cf8a104b318"}
Events
                                        
{"11f130399de2902e1bb56cf8a104b318":{"event":"success","event_message":"250 2.0.0 OK 1547542201 q15si2672229pgm.420 - gsmtp"}}
{"11f130399de2902e1bb56cf8a104b318":{"event":"view","email":"elgavon@gmail.com","timestamp":"1547543013","useragent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko)","ip":"79.179.59.4"}}
{"11f130399de2902e1bb56cf8a104b318":{"event":"click","email":"elgavon@gmail.com","timestamp":"1547543269","useragent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko)","ip":"79.179.59.4"}}

Get History Campaigns

POST
/autopilot_get_history_campaigns

Get campaigns history log.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
search string Search specific leads optional
records_start int The record number to start from optional
page_size int How many leads to fetch optional
secret string The secret required
Response Body
                                        
Success {"Results":{"data":[{"mail_id":"1","start_time":"1\/22 21:16","end_time":"1\/22 21:18","ip_group_description":"TUNNEL1","mailing_name":"MAILING_NAME","bodyfile":"CREATIVE_NAME","list":"ENG_LIST_NAME","sent":"100","total":"300","sent_per":"100%","success":"100","success_per":"100.0%","failure":"0","failure_per":"00.0%","deferral":"0","deferral_per":"00.0%","autoblock":"0","autoblock_per":"00.0%","viewed":"23","clicked":"15"},{"mail_id":"1","start_time":"1\/22 21:16","end_time":"1\/22 21:18","ip_group_description":"TUNNEL1","mailing_name":"MAILING_NAME","bodyfile":"CREATIVE_NAME","list":"ENG_LIST_NAME","sent":"52","total":"100","sent_per":"52%","success":"52","success_per":"100.0%","failure":"0","failure_per":"00.0%","deferral":"0","deferral_per":"00.0%","autoblock":"0","autoblock_per":"00.0%","viewed":"8","clicked":"3"}}

Get Current Campaigns

POST
/autopilot_get_current_campaigns

Get current running campaigns log.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
secret string The secret required
Response Body
                                        
Success {"Results":{"10436":1,"10437":1}}
Failure {"Results":[]}

Get Success Rate Per Campaign

POST
/autopilot_get_success_rate_per_campaign

Get success rate per campaign.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"10436":"100.00"}
Failure {"10436":"0.00"}

Get Campaign Stats

POST
/autopilot_get_campaign_stats

Get campaign stats.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"10436":{"total":10000,"sent":10000,"success":9987,"viewed":2346,"clicked":625,"unsubscribed":10}}
Failure {"10436":{"total":null,"sent":null,"success":null,"viewed":null,"clicked":null,"unsubscribed":null}}

Delete a Campaign

POST
/autopilot_delete_campaign

Permanently delete a campaign. This command is irreversible and its going to delete all the stats of this campaign as well.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"17688":"1"}
Failure {"17688":"ERROR: Failed to delete campaign 17688"}

Cancel a Campaign

POST
/autopilot_cancel_campaign

Cancel a campaign and stop it from running.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"10441":1}
Failure {"10441":0}

Pause a Campaign

POST
/autopilot_pause_campaign

Pause a campaign.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"10441":1}
Failure {"10441":0}

Resume a Campaign

POST
/autopilot_resume_campaign

Resume a campaign.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The campaign ID required
secret string The secret required
Response Body
                                        
Success {"10441":1}
Failure {"10441":0}

Leads Surgeon

Leads Surgeon is our list hygiene service. Here you can find all the functions to control it.

Check inline specific emails

POST
/leads_surgeon_check_bulk

Check specific emails.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string Emails to check (separated with \n) required
secret string The secret required
Response Body
                                        
Success {"from@domain.com":0}
Failure {"from@domain.com":1}

List Hygiene (File)

POST
/leads_surgeon_file_check

Check a file (upload a file for checking).

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The file handler required
secret string The secret required
Response Body
                                        
Success {"Results":{"status":"Success","id":"QTExNjJJMzAq"}}
Failure {"Results":{"status" => "Error:Invalid file"}}

File Cleaning Status

POST
/leads_surgeon_file_status

Check the cleaning status of a file.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The cleaning ID required
secret string The secret required
Response Body
                                        
Success {"QTExNjJJMzAq":{"total":2000,"done_percent":100,"good":1000,"bad":1000}}

Download File Cleaning Results

POST
/leads_surgeon_file_results

Get the cleaning results once the process is done.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
value string The cleaning ID required
secret string The secret required
Response Body
                                        
Success A zip file content
Failure {"QTExNjJJMzAq":{"ERROR":"Still in process"}}

Upload Results To Autopilot

POST
/leads_surgeon_file_upload

Upload the good leads to a list in the Autopilot mailing system.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
list_name string The list name to create required
location string The location of the new list required
value string The cleaning ID required
secret string The secret required
Response Body
                                        
Success {"QTExNjJJMzAq":1}

List Hygiene And Upload Results To Autopilot

POST
/leads_surgeon_file_check_and_upload

Clean a file and upload automatically the good leads to a list in the Autopilot mailing system.

Request Headers
authorization: Bearer [YOUR-KEY]
Request Body
                                        
list_name string The list name to create required
location string The location of the new list required
value string The file handler required
secret string The secret required