In this article, you’ll learn how to use subscriber Management API in EasySendy Pro.

Subscribers

1. Subscribe(single) to List/Add Single Subscriber to List
Description: Add single subscriber email to subscriber’s list.

(a)
Url: http://api.easysendy.com/ver1/subscribeAPI
Method: POST
Content-Type: application/x-www-form-urlencoded
Params:
api_key      –      EasySendy API key
req_type     –     subscribe
EMAIL        –     subscriber email id
listUID        –     list UID
FNAME      –     subscriber firstname
LNAME      –     subscriber lastname
Response:
{

“status”: “success”,

“message”: “Thank you for joining our email list. Please confirm your email address now!”

}

Sample to use(Curl):

curl –request POST ‘http://api.easysendy.com/ver1/subscribeAPI’
–H ‘Content-Type: application/x-www-form-urlencoded’
–data ‘api_key=your_api_key&req_type=subscribe&listUID&EMAIL=email@email.com’

(b)
Url: http://api.easysendy.com/rest/subscriber/add
Method: POST
Content-Type: application/json
Params:
{
“api_key”:”your _easysendy_api_key”,
“list”:”list_UID”,
“FNAME”:”firstname”,
“LNAME”:”lastname”,
“EMAIL”:”email@email.com”
}
Response:

{

“status”: “success”,

“message”: “Thank you for joining our email list. Please confirm your email address now!”

}

Note:

      • Send custom fields tags in params
      • Put date related fields in yyyy-mm-dd
      • Date-time related fields in yyyy-mm—dd HH:mm:ss (time in 24 hour format)

Sample to use(Curl):

curl –request POST ‘http://api.easysendy.com/ver1/subscribeAPI’
–H ‘Content-Type: application/x-www-form-urlencoded’
–data ‘api_key=your_api_key&req_type=subscribe&listUID&EMAIL=email@email.com’


2. Subscribe(multiple) to List/Add Multiple Subscriber to List
Description: Add multiple subscriber emails to subscriber’s list.

Url: http://api.easysendy.com/rest/subscriber/addMultiple
Method: POST
Content-Type: application/json
Params:
{

“api_key”:”your _easysendy_api_key”,
“list”:”list_UID”,
“subscribers”:[
{
“FNAME”:”Subscriber1″,
“EMAIL”:”subscriber1@test.com”

},
{
“FNAME”:”Subscriber2″,
“EMAIL”:”subscriber2@dataaegis.com”
}
] }

Response:

{

“status”: “success”,

“message”: “Thank you for joining our email list. Please confirm your email address now!”

}


3. Unsubscribe from List
Description
: Add and subscriber email to subscribers list

(a)

Url: http://api.easysendy.com/ver1/subscribeAPI
Method
: POST

Content-Type: application/x-www-form-urlencoded
Params:

EMAIL – subscriber email,
listUID – list Uid ,
api_key – App API key,
req_type – unsubscribe

Response:

{

“status”: “success”,

“message”: “You are successfully unsubscribed!”

}

Note:

  • Send custom fields tags in params
  • Put date related fields in yyyy-mm-dd
  • Date-time related fields in yyyy-mm—dd HH:mm:ss (time in 24 hour format)

Sample to use(Curl):

curl –request POST ‘http://api.easysendy.com/ver1/subscribeAPI’

–H ‘Content-Type: application/x-www-form-urlencoded’

–data ‘api_key=your_api_key&req_type= unsubscribe &EMAIL=email@email.com’


4. Get Subscriber Status

Description: Get details of the subscriber such as subscriber_uid and status if its confirmed or unconfirmed and date added.

Url: http://api.easysendy.com/rest/subscriber/status

Method: POST

Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“list”:”list_UID”,
“EMAIL”:”email@email.com”
}

Response:

{

“status”:”success”,

“message”: {

“subscriber_uid”: “subscriber_uid”,

“status”: “unconfirmed/confirmed”,

“date_added”: “2017-12-11 10:27:27”

}

}


5. Edit Single Subscriber 

Description: Edit and update data records of any single subscriber.

Url: http://api.easysendy.com/rest/subscriber/edit

Method: POST

Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“list”:”list_UID”,
“FNAME”:”firstname”,
“LNAME”:”lastname”,
“EMAIL”:”email@email.com”,
“Status”: “confirmed/unconfirmed/unsubscribed”
}

Response:
{

“status”: “success”,

“message”: “Subscriber details are successfully updated”

}

Note: 

Status – In this key any one of the three value provided can be used(confirmed/unconfirmed/unsubscribed).


6. Edit Multiple Subscriber 

Description: Edit and update data records of multiple subscriber at once.

Url: http://api.easysendy.com/rest/subscriber/editMultiple

Method: POST

Content-Type: application/json

Params:

{

“api_key”: “your _easysendy_api_key”,
“list”: “list_UID”,
“subscribers”:[
{
“FNAME”: “Subscriber1”,
“EMAIL”: “subscriber1@test.com”,
“Status”: “confirmed/unconfirmed/unsubscribed”

},
{
“FNAME”: “Subscriber2”,
“EMAIL”: “subscriber2@dataaegis.com”,
“Status”: “confirmed/unconfirmed/unsubscribed”
}
] }

Response:
{

“status”: “success”,

“message”: “Subscriber details are successfully updated”

}

Note: 

Status – In this key any one of the three value provided can be used(confirmed/unconfirmed/unsubscribed).


Lists

1. Get All Lists

Description: Get all list name and their description.

(a)

Url : http://api.easysendy.com/ver1/listAPI
Method: POST
Content-Type: application/x-www-form-urlencoded

Params:

api_key – EasySendy API key
req_type – allLists

Response:

{

“status”: “success”,

“count”:20,

“listsData”:    [ {   “list_uid”:

“listUID”,

“name”: “TestList”,

“display_name”: “TestList”,

“description”: “testing”}

]

}

(b)

Url : http://api.easysendy.com/rest/subscribers_list/lists
Method: POST
Content-Type: application/json

Params:
{
“api_key”: “your _easysendy_api_key”
}

Response:

{

“lists”:  [  {  “hash”:”listUID”,

“name”: “TestList”,

“description”: “testing”,

“subscribers_number”:”2″

}

Sample to use(Curl):

curl ‘http://api.easysendy.com/ver1/listAPI’

–H ‘Content-Type: application/x-www-form-urlencoded’

–data ‘api_key=your_api_key&req_type=allLists’


2. Get All Fields(tags)
Description
: Get all fields of the list 

Url: http://api.easysendy.com/rest/subscribers_list/getFields

Method: POST
Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“hash”:”listUID”
}

Response:

{

“fields”:  [  {  “hash”:”bq611tokfha4c”,

“name”:”Email”,

“tag”:”EMAIL”

},

]

}

Sample to use(Curl):

curl ‘http://api.easysendy.com/ver1/listAPI’

–H ‘Content-Type: application/json’

–data ‘api_key=your_api_key&hash=listUID’


3. Create List
Description
: Create your list. 

Note: – Your Company Details should be updated in your EasySendy profile to create list.

Url: http://api.easysendy.com/rest/subscribers_list/create

Method: POST
Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“name”:”TestList”,
“description”:”testing”
}

Response:

{

“status”:”OK”,

“hash”:”listUID”

}


4. Update List
Description
: Update your existing list

Url: http://api.easysendy.com/rest/subscribers_list/update

Method: POST
Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“hash”:”listUID”,
“name”:”TestListNewName”,
“description”:”testing”
}

Response:

{

“status”:”List successfully updated.”

}


5. Delete List
Description
: Delete your existing list

Url: http://api.easysendy.com/rest/subscribers_list/delete

Method: POST
Content-Type: application/json

Params:

{
“api_key”:”your _easysendy_api_key”,
“hash”:”listUID”
}

Response:

{

“status”:”OK”,

“data”:”delete done”

}



Still Not an User of EasySendy Pro for Hybrid Email Campaigns?