How can we help you?

in APIFile Sharing, Hosting, & DomainsIntegrations & Forms

Sendlane API Documentation

Updated March 8, 2017

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

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 the keys. The keys are also accessible in your Account Settings.
Security Credentials All responses to our API calls are shown in JSON with the exception of api/v1/subscriber-export. 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

Use POST method


List of API Calls

– To fetch optin form

– To create optin form

– To export subscriber

– To get the list of tags

– To create a new Tag

– To add a single existing subscriber to tags.

– To remove a single existing subscriber to tags.


/api/v1/user-details

– To get the api and hash key of the user example API call:

https://SUBDOMAIN.sendlane.com/api/v1/user-details
?email=EMAILID
&password=PASSWORD
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:

https://SUBDOMAIN.sendlane.com/api/v1/list-subscribers-add
?api=APIKEY
&hash=HASHKEY 
    // default params
&list_id=VALIDLISTID
&email=VALIDEMAIL1,VALIDEMAIL2,VALIDEMAIL3...
    // 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:

https://SUBDOMAIN.sendlane.com/api/v1/list-subscriber-add
?api=APIKEY
&hash=HASHKEY
    // default params
&list_id=VALIDLISTID
&email=VALIDEMAIL1
    // 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:

https://SUBDOMAIN.sendlane.com/api/v1/subscribers-delete
?api=APIKEY
&hash=HASHKEY 
    // default params
&list_id=VALIDLISTID
&email=EXISTINGSUBSCRIBER
    // 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/list-create

To create list. Please reference this guide for more information on the requirements for creating a List. example API call:

https://SUBDOMAIN.sendlane.com/api/v1/list-create
?api=APIKEY
&hash=HASHKEY
    // default params
&list_name=LISTNAME
&from_name=FROMNAME
&reply_email=DEFAULTFROMEMAIL (custom email domain)
&short_reminder=SHORTDESCRIPTION
&company=COMPANYNAME
&address=ADDRESS
&city=CITY
&zipcode=ZIPCODE
&state=STATE
&country=COUNTRY
&phone=PHONE#
    // 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:

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:

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:

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:

https://SUBDOMAIN.sendlane.com/api/v1/opt-in-form
?api=APIKEY
&hash=HASHKEY
    // default params
&form_id=VALIDFORMID
    // 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:

https://SUBDOMAIN.sendlane.com/api/v1/opt-in-create
?api=APIKEY
&hash=HASHKEY
    // default params
&list_id=<VALIDLISTID
&form_name=FORMNAME
&email=CAPTION
    // 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:

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)

Successful call:

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:

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:

https://SUBDOMAIN.sendlane.com/api/v1/tag-create
?api=APIKEY
&hash=HASHKEY
    // default params
&name=TAGNAME
    // 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:

https://SUBDOMAIN.sendlane.com/api/v1/tag-subscriber-add
?api=APIKEY
&hash=HASHKEY
    // default params
&email=VALIDSUBSCRIBEREMAIL
&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:

https://SUBDOMAIN.sendlane.com/api/v1/tag-subscriber-remove
?api=APIKEY
&hash=HASHKEY
    // default params
&email=VALIDSUBSCRIBEREMAIL
&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: