API Docs

This is Sendlane’s API Documentation, which contains a full index of Sendlane’s API calls and how to implement them. 

The sections here will go over getting started, the full list of API calls and details for each call individually. 

Getting Started All calls should be made using the POST method. Every call must include an API Key and Hash Key, which is unique to each Sendlane user account. 

The api/v1/user-details call can be used with your email log-in and password passed through to obtain your API & Hash keys. This is the only call that does not require your API and Hash keys. 

The API and Hash keys are also accessible in your Account Settings under Developer. All responses to our API calls are shown in JSON with the exception of api/v1/subscriber-export which is returned as a serialized string. 

Many of the methods listed below will have example responses. Each call will require the API / Hash keys to be passed in along with other parameters that are specific to each method. 

Please see below for more detail for each available call.

General example API call:

https://SUBDOMAIN.sendlane.com/api/v1/METHOD?api=APIKEY&hash=HASHKEY

List of API Calls – To get the api and hash key of the user.

  • /api/v1/user-details

– To add Multiple subscribers with single list without custom fields.

  • /api/v1/list-subscribers-add

– To add a Single subscriber to a list with custom fields.

  • /api/v1/list-subscriber-add

– To delete email from given lists

  • /api/v1/subscribers-delete

– To unsubscribe an email address

  • /api/v1/unsubscribe

– To create list

  • /api/v1/list-create

– To update list

  • /api/v1/list-update

– To delete list

  • /api/v1/list-delete

– To get lists

  • /api/v1/lists

– To fetch optin form

  • /api/v1/opt-in-form

– To create optin form

  • /api/v1/opt-in-create

– To export subscriber

  • /api/v1/subscriber-export

– To get the list of tags

  • /api/v1/tags

– To create a new Tag

  • /api/v1/tag-create

– To add a single existing subscriber to tags.

  • /api/v1/tag-subscriber-add

– To remove a single existing subscriber to tags

  • /api/v1/tag-subscriber-remove

– To return subscriber record for an existing contact.

  • /api/v1/subscriber-exists

/api/v1/user-details To get the api and hash key of the user Example API call:

<code>https://<a href="https://help.sendlane.com/wp-content/uploads/2015/11/Subdomain_DS.png">SUBDOMAIN</a>.sendlane.com/api/v1/user-details ?email=<a>EMAILID</a> &password=<a>PASSWORD</a>
Parameters Required Type Description
email Yes String Email ID (user account email) Valid email name@domain
password Yes String Password

Successful call: /api/v1/list-subscribers-add To add Multiple subscribers with single list without custom fields. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/list-subscribers-add ?api=APIKEY &hash=HASHKEY      // default params &list_id=VALIDLISTID &email=<a>VALIDEMAIL1</a>,<a>VALIDEMAIL2</a>,<a>VALIDEMAIL3</a>...     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
email Yes String Email format should be like the following and separated by comma firstname lastname<test@gmail.com>, firstname lastname<test1@gmail.com> or firstname<test@gmail.com>, firstname<test1@gmail.com> or <test@gmail.com>, <test1@gmail.com> or test@gmail.com, test1@gmail.com Valid email name@domain
list_id Yes Int Valid list_id #
tag_ids No String tag_id’s separated by comma. Eg tagId1, tagId2,... Valid tag_id #
tag_names No String Tag name’s separated by comma. Eg Test Tag1,Test Tag2,.... If give both tag_ids and tag_names then will not consider tag_names
Custom Field 1 No String  
Custom Field 2 No String NOTE: You can add any number of custom fields

Successful call: /api/v1/list-subscriber-add To add a Single subscriber to a list with custom fields Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/list-subscriber-add ?api=APIKEY &hash=HASHKEY     // default params &list_id=VALIDLISTID &email=<a>VALIDEMAIL1</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
first_name No String  
last_name No String  
email Yes String Valid email name@domain
list_id Yes Int Valid list_id #
Custom Field 1 No String  
Custom Field 2 No String NOTE: You can add any number of custom fields
tag_ids No String tag_id’s separated by comma. Eg tagId1, tagId2,... Valid tag_id #
tag_names No String Tag name’s separated by comma. Eg Test Tag1,Test Tag2,.... If give both tag_ids and tag_names then will not consider tag_names.

Successful call: /api/v1/subscribers-delete To delete subscriber from given lists. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/subscribers-delete ?api=APIKEY &hash=HASHKEY      // default params &list_id=VALIDLISTID &email=<a>EXISTINGSUBSCRIBER</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
list_id Yes String list_id’s separated by comma, where the subscriber email belongs to multiple list listId_1, listId_2,... Valid list_id #
email Yes String Subscriber email to delete. (Single email) Valid email name@domain

Successful call: /api/v1/unsubscribe To unsubscribe an email address. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/unsubscribe ?api=APIKEY &hash=HASHKEY      // default params &list_id=VALIDLISTID &email=<a>EXISTINGSUBSCRIBER</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
email Yes String Subscriber email to delete. (Single email) Valid email name@domain
list_id No String If not provided, unsubscribes from ALL Lists. Valid list_id #

Successful call:

<code>"success": "Unsubscribed successfully."

/api/v1/list-create To create list. xample API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/list-create ?api=APIKEY &hash=HASHKEY     // default params &list_name=<a>LISTNAME</a> &from_name=<a>FROMNAME</a> &reply_email=<a>DEFAULTFROMEMAIL</a> <a href="http://blog.sendlane.com/important-announcement/">(custom email domain)</a> &short_reminder=<a>SHORTDESCRIPTION</a> &company=<a>COMPANYNAME</a> &address=<a>ADDRESS</a> &city=<a>CITY</a> &zipcode=<a>ZIPCODE</a> &state=<a>STATE</a> &country=<a>COUNTRY</a> &phone=<a>PHONE#</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
list_name Yes String List name will be unique and it will be not allow duplicate list names
from_name Yes String From name may not be greater than 100 characters it will not allow regular expressions like "/^[^"<>@]+$/"
reply_email Yes String Reply email Yahoo/AOL reject emails that claim to come from yahoo/AOL but actually originate at non-Yahoo/AOL servers Valid email name@domain (custom email domain required)
default_reply_email No String Default Reply email Yahoo/AOL reject emails that claim to come from yahoo/AOL but actually originate at non-Yahoo/AOL servers Valid email name@domain (custom email domain required)
subject No String Enter the subject
short_reminder Yes String Enter the description
company Yes String Enter the company name
address Yes String Enter the Address
city Yes String Enter the city
zipcode Yes String Enter the zipcode
country   String Enter the country
state Yes String Enter the state
phone Yes Integer Enter phone number Valid phone number – 9 digits no space,( ), -, +

Successful call:

/api/v1/list-update To update list. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/list-update ?api=APIKEY &hash=HASHKEY     // default params &list_id=VALIDLISTID & parameters to be updated     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
list_id Yes Integer Enter valid list id
from_name No String From name may not be greater than 100 characters it will not allow regular expressions like "/^[^"<>@]+$/"
reply_email No String Reply email Yahoo/AOL reject emails that claim to come from yahoo/AOL but actually originate at non-Yahoo/AOL servers Valid email name@domain
default_reply_email No String Default Reply email Yahoo/AOL reject emails that claim to come from yahoo/AOL but actually originate at non-Yahoo/AOL servers Valid email name@domain
subject No String Enter the subject
short_reminder No String Enter the description
company No String Enter the company name
address No String Enter the Address
city No String Enter the city
zipcode No String Enter the zipcode
country No String Enter the country
state No String Enter the state
phone No Integer Enter phone number Valid phone

Successful call: 

/api/v1/list-delete To delete list. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/list-delete ?api=APIKEY &hash=HASHKEY     // default params &list_id=VALIDLISTID     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
list_id Yes Integer Enter valid list id

Successful call:

/api/v1/lists To get lists. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/lists ?api=APIKEY &hash=HASHKEY
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String md5(your_login_email.api). MD5 of your email and api key provided
list_id No Integer Enter valid list id
start No Integer Page number to start retrieving Lists from
limit No Integer Results per page returned (max:100)

Successful call:

/api/v1/opt-in-form To fetch opt in form Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/opt-in-form ?api=APIKEY &hash=HASHKEY     // default params &form_id=<a>VALIDFORMID</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
form_id Yes Int Enter the form id Valid form id

Successful call:

/api/v1/opt-in-create To create opt in form Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/opt-in-create ?api=APIKEY &hash=HASHKEY     // default params &list_id=<VALIDLISTID &form_name=<a>FORMNAME</a> &email=<a>CAPTION</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
list_id Yes String String should be like 1,2,3
form_name Yes String Enter the form name
first_name No String Enter the first name caption
last_name No String Enter the last name caption
email Yes String Enter the email caption
send_opt_mail No Int To send confirmation mail1-Yes,0-No
redirect_url No String To redirect thank you page

Successful call:

/api/v1/subscriber-export To export Subscriber Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/subscriber-export ?api=APIKEY &hash=HASHKEY     // default params &list_id=VALIDLISTID     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
list_id Yes Int List id
start No Int Starting Value of the Result (By default : 1)
limit No Int Result Limit Per Result (By default : 10)
format No String Supported format CSV , text (By default : CSV)
subscribed_since No String Date in format yyyy-mm-dd

Successful call: 

<code>a:1: {s:8:"response";s:301:     "Email,FirstName,LastName,"custom field 1","Subscribed date",subscribed     VALIDEMAIL,FIRSTNAME,LASTNAME,CUSTOMFIELD,"##-##-#### ##:##:##",Yes     VALIDEMAIL,FIRSTNAME,LASTNAME,CUSTOMFIELD,"##-##-#### ##:##:##",Yes     VALIDEMAIL,FIRSTNAME,LASTNAME,CUSTOMFIELD,"##-##-#### ##:##:##",Yes     VALIDEMAIL,FIRSTNAME,LASTNAME,CUSTOMFIELD,"##-##-#### ##:##:##",Yes     VALIDEMAIL,FIRSTNAME,LASTNAME,CUSTOMFIELD,"##-##-#### ##:##:##",Yes ";}

/api/v1/tags To get the list of tags. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/tags ?api=APIKEY &hash=HASHKEY     // default params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
tag_id No Int Tag id (Valid tag_id #)
start No Int Starting Value of the Result (By default : 1)
limit No Int Result Limit Per Result (By default : 10)

Successful call:

/api/v1/tag-create To create a new Tag. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/tag-create ?api=APIKEY &hash=HASHKEY     // default params &name=<a>TAGNAME</a>     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
name Yes String Tag name

Successful call:

 /api/v1/tag-subscriber-add To add a tag to a single existing subscriber. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/tag-subscriber-add ?api=APIKEY &hash=HASHKEY     // default params &email=<a>VALIDSUBSCRIBEREMAIL</a> &tag_ids=VALIDTAGID     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash email Yes Yes String String Your HASH key provided Subscriber email (Valid email name@domain)
tag_ids No/Yes (If tag_names not provided) String tag_id’s separated by comma. Eg tagId1, tagId2,... Required if tag_names not provided. Valid tag_id #
tag_names Yes (If tag_ids not provided) String Tag name’s separated by comma. Eg Test Tag1,Test Tag2,.... Required if tag_ids not provided.

Successful call:

/api/v1/tag-subscriber-remove To remove a single existing subscriber’s tag. Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/tag-subscriber-remove ?api=APIKEY &hash=HASHKEY     // default params &email=<a>VALIDSUBSCRIBEREMAIL</a> &tag_ids=VALIDTAGID     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash email Yes Yes String String Your HASH key provided Subscriber email (Valid email name@domain)
tag_ids Yes (If tag_names not provided) String tag_id’s separated by comma. Eg tagId1, tagId2,... Required if tag_names not provided. Valid tag_id #
tag_names Yes (If tag_ids not provided) String Tag name’s separated by comma. Eg Test Tag1,Test Tag2,.... Required if tag_ids not provided.

Successful call: 

/api/v1/subscriber-exists To return subscriber record for an existing contact.

Example API call:

<code>https://SUBDOMAIN.sendlane.com/api/v1/subscriber-exists<br>?api=APIKEY<br>&hash=HASHKEY     // default params<br>&list_id=VALIDLISTID<br>&email=VALIDEMAIL     // method specific params
Parameters Required Type Description
api Yes String Your API key provided
hash Yes String String Your HASH key provided
list_id Yes  String String should be 1, 2, 3 (for example)
email Yes String Subscriber email (Valid email name@domain)

Successful call: 

Did this answer your question? Thanks for your feedback! There was a problem submitting your feedback. Please try again!

Still need help? How can we help? How can we help?