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


/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/send-mail

To send mails.

Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your Hash provided
sender_name No String Receiver’s Name
sender_email Yes String Receiver’s email Valid email name@domain
receipent_name No Sting Sender Name
receipent_email Yes Sring Sender email Valid email name@domain
cc_email No Sting Carbon Copy Email Valid email name@domain
bcc_email No String Blind Carbon Copy Email Valid email name@domain
subject No Sting Subject for the Mail
reply_to_email No String Reply to email Valid email name@domain
content_html Yes String Body of the message (Html tags allowed)
content_plain_text No String Body Of the message in plain (No Html Tags)
(Yes, if content_html does not exist)
track_opens No Integer To track email is opened

1 - track; 0 - Will not track (0 - Default)

track_clicks No Integer To track the links send in the email

1- track; 0 -will not track (0 - Default)

track_plain_text_clicks No Integer To track the links send in the email

1- track; 0 -will not track (0 - Default)

track_google_analytics_link No Integer 1- track; 0 -will not track (0 - Default)
google_analytics_key No String Empty By Default

/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 Start limit from
limit No Integer End limit to

Successful call:


/api/v1/autoresponders

To fetch details of autoresponders.
example API call:

https://SUBDOMAIN.sendlane.com/api/v1/autoresponders
?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
autoresponder_id No Int
autoresponder_type No String Regular, Plain-text.
title No String
list_id No Int list_id should be valid and exists.
status No String ‘NotStarted’, ‘Progressing’, ‘Cancelled’, ‘Completed’, ‘Draft’, ‘Deleted’, ‘Scheduled’, ‘Stop’. Choose any one.
start No Int Record start from page.
limit No Int Total records you want to fetch.

Successful call:


/api/v1/autoresponder-create

To create a new autoresponder.

example API call:

https://SUBDOMAIN.sendlane.com/api/v1/autoresponder-create
?api=APIKEY
&hash=HASHKEY
    // default params
&list_id=VALIDLISTID
&autoresponder_type=STRING
&event_id=EVENTID#
&content=CONTENT
&subject=SUBJECT
    // 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
autoresponder_type Yes String Regular, Plain-text.
list_id No/Yes

(If tag_id

not provided)

String Format should be list_id_1:segment_id_1, list_id_1:segment_id_2, list_id_2:segment_id_3,

Required if tag_id not provided.

tag_id No/Yes

(If list_id not provided)

String tag_id’s separated by comma. Eg

tagId1, tagId2,...

Required if list_id not provided.

Valid tag_id #

from_name No/Yes

(If tag_id provided)

String This is who your emails will come from. Use something they’ll instantly recognize, like your company name.

Required if tag_id provided.

from_email No/Yes

(If tag_id provided)

String Replies to your campaign will go to this email address.

Required if tag_id provided.

Valid Email name@domain

event_id Yes Int event_id should be any one from 1, 2, 3, 4

1 - Subscription to
list

2 - Campaign is
opened

3 - Any link in
campaign is clicked

4 - Specific link in campaign is clicked

campaign_id No/Yes Int Required only when
event_id != 1
specific_link_clicked No/Yes String
Required only when
event_id = 4
autoresponder_send No String Should be like
‘within the hour’,
‘1 days’, ‘1 week’,
‘1 month’, ‘1 year’
schedule_time No String Should be like ‘00:00:00’
schedule_day No String schedule_day should be
any one from
1, 2, 3, 4, 5, 6, 7
‘Weekdays from sunday
to saturday’.
title No String Title for the autoresponder
subject No String Campaign subject. Required if list_id does not have default subject.

Limit: 150 chars

Keep it relevant and non-spammy to avoid spam filters.

title No String Name of the campaign
content Yes String HTML Content of the campaign
content_plain_text No String Required, if `autoresponder_type` = 2 (plain-text)

Plain-text content of the campaign

google_analytics_link_tracking No String ‘Yes’, ‘No’ (by default ‘Yes’)
google_analytics_key No String
track_opens No String ‘Yes’, ‘No’ (by default ‘No’)
track_clicks No String ‘Yes’, ‘No’ (by default ‘No’)
track_plain_text_clicks No String ‘Yes’, ‘No’ (by default ‘No’)
attachment File Accept only PDF//txt files

Successful call:


/api/v1/autoresponder-confirm

To confirm autoresponder.

example API call:

https://SUBDOMAIN.sendlane.com/api/v1/autoresponder-create
?api=APIKEY
&hash=HASHKEY
    // default params
&list_id=VALIDLISTID
&autoresponder_type=STRING
&event_id=EVENTID#
&content=CONTENT
&subject=SUBJECT
    // 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
autoresponder_id Yes Int
autoresponder_type No String Regular or Plain-text. Choose any one
event_id Yes Int event_id should be any one from 1, 2, 3, 4

1 - Subscription to
list

2 - Campaign is
opened

3 - Any link in
campaign is clicked

4 - Specific link in campaign is clicked

campaign_id No/Yes Int Required only when
event_id != 1
specific_link_clicked No/Yes String
Required only when
event_id = 4
autoresponder_send No String Should be like
‘within the hour’,
‘1 days’, ‘1 week’,
‘1 month’, ‘1 year’
schedule_time No String Should be like ‘00:00:00’
schedule_day No String schedule_day should be
any one from
1, 2, 3, 4, 5, 6, 7
‘Weekdays from sunday
to saturday’.
subject No String Campaign subject

Required if list_id does not have default subject.

Limit: 150 chars

Keep it relevant and non-spammy to avoid spam filters.

content No String
content_plain_text No String Required, if `autoresponder_type` = 2 (plain-text)
track_opens No String ‘Yes’, ‘No’
track_clicks No String ‘Yes’, ‘No’
track_plain_text_clicks No String ‘Yes’, ‘No’
google_analytics_link_tracking No String ‘Yes’, ‘No’
google_analytics_key
attachment
No String
File
Accept only PDF/txt files

/api/v1/autoresponder-update

To update details of given autoresponder_id.

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
autoresponder_id Yes Int
list_id No String Format should be list_id_1:segment_id_1, list_id_1:segment_id_2, list_id_2:segment_id_3,
tag_id No String tag_id’s separated by comma. Eg

tagId1, tagId2,...

Valid tag_id #

from_name No/Yes

(If tag_id provided)

String This is who your emails will come from. Use something they’ll instantly recognize, like your company name.

Required if tag_id provided.

from_email No/Yes

(If tag_id provided)

String Replies to your campaign will go to this email address.

Required if tag_id provided.

Valid email name@domain

event_id Yes Int event_id should be any one from 1, 2, 3, 4

1 - Subscription to
list

2 - Campaign is
opened

3 - Any link in
campaign is clicked

4 - Specific link in campaign is clicked

campaign_id No/Yes Int Required only when
event_id != 1
specific_link_clicked No/Yes String
Required only when
event_id = 4
autoresponder_send No String Should be like
‘within the hour’,
‘1 days’, ‘1 week’,
‘1 month’, ‘1 year’
schedule_time No String Should be like ‘00:00:00’
schedule_day No String schedule_day should be
any one from
1, 2, 3, 4, 5, 6, 7
‘Weekdays from sunday
to saturday’.
subject No String Campaign subject

Required if list_id does not have default subject.

Limit: 150 chars

Keep it relevant and non-spammy to avoid spam filters.

content No String
content_plain_text No String Required, if `autoresponder_type` = 2 (plain-text)
track_opens No String ‘Yes’, ‘No’
track_clicks No String ‘Yes’, ‘No’
track_plain_text_clicks No String ‘Yes’, ‘No’
google_analytics_link_tracking No String ‘Yes’, ‘No’
google_analytics_key

attachment

No String

File

Accept only PDF/txt files

/api/v1/autoresponder-delete

To delete the given autoresponder_id(s).

example API call:

https://SUBDOMAIN.sendlane.com/api/v1/autoresponder-delete
?api=APIKEY
&hash=HASHKEY
    // default params
&autoresponder_id=AUTORESPONDERID
    // 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
autoresponder_id Yes String autoresponder_id’s separated by comma,

1,2,...

Valid autoresponder_id

Successful call:


/api/v1/user-create

To create user account.

Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
first_name Yes String Enter the first name
last_name Yes String Enter the last name
email Yes String Enter the email id Valid email name@domain
domain Yes String Enter the domain name
The domain may not be greater than 25 characters
This is going to be the unique website address of your account
password Yes String Enter the password Maximum size is 20
card_number Yes String Enter the card number Valid card number
name_on_card Yes String Enter the name on card
cvv Yes Int Enter the card CVV number Valid CVV Number
Maximum size is 3
exp_year Yes Int Enter the card expiry year (Ex:2015)
exp_month yes Int Enter the card expiry month (Ex:01)
address Yes String Enter the address
city Yes String Enter the city
state Yes String Enter the state
country_code Yes String Enter the string code Valid country code
zip_code Yes String Enter the zip code
phone Yes Int Enter the phone number Valid phone number – 9 digits no space,( ), -, +
coupon No String Enter the coupon code

/api/v1/user-update

To update user account.

last_nameNoStringEnter the last nameold_passwordNoStringEnter the old password

Parameters Required Type Description
api Yes String Your API key provided
hash Yes String Your HASH key provided
user_id Yes String Enter the user id Valid user id
first_name No String Enter the first name
new_password Yes String Required, if old password exists
confirmation_password Yes String Required, if old password exists and it is compared with new password
phone No String Enter the phone number

/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:


12