How can we help you?

in APIFile Sharing, Hosting, & DomainsIntegrations & Forms

Sendlane API Documentation

Updated February 22, 2017

This is Sendlane’s API Documentation, which contains a full index of Sendlane’s API calls and how to implement them.
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. All responses to our API calls are shown in JSON. Many of the methods listed below will have example responses.

General example API call:

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

Use POST method

List of API Calls

  • Sendlane – API ReferenceVersion: v1 Document for the API to create / export / delete Subscribers / Send Mail / create List/ update List/ delete List/   get  List/.

    – To get the api and hash key of the user.

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

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

    – To delete email from given lists

    – To delete email from given lists

    – To create list

    – To update list

    – To delete list

    – To get lists

    – To fetch autoresponders

    – To create autoresponders

    –  To confirm autoresponder

    –  To delete autoresponder

    –  To confirm autoresponder

    –  To create user account

    –  To update user account

    –  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
    password Yes String Password

    Successful call:

    {
        "api_key": "xxxxxxxxxxxxx",
        "api_hash": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "domain": "SUBDOMAIN"
    }
    

    /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

    list_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

    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

    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:

    {
        "success": "Subscriber added successfully"
    }
    

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

    {
        "success": "Subscriber added successfully"
    }
    

    /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

    Successful call:

    {
        "success": "Deleted subscriber(s) successfully"
    }
    

    /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
    receipent_name No Sting Sender Name
    receipent_email Yes Sring Sender email Valid email
    cc_email No Sting Carbon Copy Email  Valid email
    bcc_email No String Blind Carbon Copy Email  Valid email
    subject No Sting Subject for the Mail
    reply_to_email No String Reply to email  Valid email
    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 not exists)
    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.

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

    /api/v1/list-update

    To update list.

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

    /api/v1/list-delete

    To delete list.

    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

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

    [
      {
        "list_id": "1",
        "list_name": “LISTNAME”,
        "default_from_name": “FROMNAME”,
        "default_from_email": “FROMEMAIL”,
        "default_reply_email": "",
        "default_subject": "",
        "list_key": “xxxxxxxxxx”,
        "description": "",
        "created_by": “NAME”,
        "contact_name": "",
        "contact_email": "",
        "company": “COMPANY”,
        "address": “ADDRESS”,
        "city": “CITY”,
        "postal_code": “#####”,
        "country": “COUNTRY”,
        "state_code": “STATE”,
        "phone": “### ####”,
        "status": "Active",
        "date_added": “0000-00-00 00:00:00”,
        "deleted_date": "0000-00-00 00:00:00"
      }
    ]

    /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 Int 1 – Regular, 2 – 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.
    lmiit No Int Total records you want to fetch.

    Successful call:

    {
      "response": [
        {
          "autoresponder_id": "1",
          "owner_id": “#####”,
          "campaign_type": "Regular",
          "event_id": "1",
          "specific_link_clicked": "",
          "duration": "1",
          "autoresponder_sent": "hour",
          "schedule_time": "00:00:01",
          "schedule_day": "1,2,3,4,5,6,7",
          "list_id": "0",
          "list_name": “LIST”,
          "track_code": “xxxxxxxxxx”,
          "title": “TITLE”,
          "from_name": "",
          "from_email": "",
          "subject": “SUBJECT”,
          "template_id": "0",
          "html_content": "
    Hello,

    This an example Autoresponder.

    Thank you.
    ", "plain_content": "Hello,\r\n\r\nThis an example Autoresponder.\r\n\r\nThank you.\r\n\r\n", "total_email": "0", "mails_sent": "0", "status": "NotStarted", "google_analytics_key": "", "date_added": "2017-02-23 16:38:59", "date_updated": "2017-02-23 16:40:19", "unique_views_count": 0, "unique_clicks_count": 0, "open_rate": 0, "click_rate": 0, "successful_deliveries_percent": 0 } ] }

    /api/v1/autoresponder-create

    To create a new autoresponder.

    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 Int Regular or Plain-text. Choose any one
    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

    event_id

     

     

    campaign_id

    specific_link_clicked
    autoresponder_send
    schedule_time
    schedule_day

    Yes

    No/Yes

    No/Yes
    No
    No
    No

    Int

    Int

    String
    String
    String
    String

    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

    Required only when (event_id != 1)
    Required only when (event_id = 4)
    Should be like  (‘within the hour’, ‘1 days’, ‘1 week’, ‘1 month’, ‘1 year’ )
    Should be like ‘00:00:00’
    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 `campaign_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

    /api/v1/autoresponder-confirm

    To confirm autoresponder.

    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

     

     

    campaign_id

    specific_link_clicked
    autoresponder_send
    schedule_time
    schedule_day

    Yes

    No/Yes

    No/Yes
    Yes
    No
    No

    Int

    Int

    String
    String
    String
    String

    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

    Required only when (event_id != 1)
    Required only when (event_id != 4)
    Should be like  (‘within the hour’, ‘1 days’, ‘1 week’, ‘1 month’, ‘1 year’ )
    Should be like ‘00:00:00’

    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 `campaign_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 Formet 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

    event_id

     

     

    campaign_id
    specific_link_clicked
    autoresponder_send
    schedule_time

    schedule_day
    title

    Yes

    No/Yes
    No/Yes
    No/Yes
    Yes
    No
    No

    Int

    Int
    Int

    String
    String
    String
    String

    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
    Required only when (event_id != 1)

     

    Required only when (event_id = 4)
    Should be like  (‘within the hour’, ‘1 days’, ‘1 week’, ‘1 month’, ‘1 year’ )

    Should be like ‘00:00:00’
    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 `campaign_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/list-subscriber-add?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:

    {
      "success": "Autoresponder deleted successfully"
    }
    

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

    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

    /api/v1/opt-in-create

    To create opt in form

    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
    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 mail(1-Yes,0-No)
    redirect_url No String To redirect thank you page

    /api/v1/subscriber-export

    To export Subscriber

    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)

    /api/v1/tags

    To get the list of tags

    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)

    /api/v1/tag-create

    To create a new Tag

    Parameters Required Type Description
    api Yes String Your API key provided
    hash Yes String Your HASH key provided
    name Yes String Tag name

    /api/v1/tag-subscriber-add

    To add a single existing subscriber to tags.

    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)

    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.

    /api/v1/tag-subscriber-remove

    To remove a single existing subscriber to tags.

    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)

    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.

12