Knowledgebase

Add List

Following is the API document formation to add subscriber list with an example of sample request code.

Required to Submit Json Request

Username

The email that account holder uses to login MUMARA

API Token

The API token user has generated using API Configuration section of MUMARA, also mentioned above.

Method

Method being called (Post)

Path

Path to the API file being called ('http//www.yourdomain.com/API/deleteSubscriber)

Field Details

Label/ Variable

Priority

Description

list_name

Required

Name of the subscriber list you are going to add.

list_owner_name

Required

Name of the person who owns the list

list_reply_to_ email

Required

The email address where you want to receive and collect the replies from the recipients.  

list_bounce_email

Required

Bounce email address where you want to receive and collect the bounced/ non-delivery report for this list.

list_owner_email

Required

Email address associated with the owner of the list, it is also used as “From Email” of the list owner.

list_group_name

Required

Want to add email list to a group? Provide list group name

list_group_id

Required

Provide list group ID

Sample Request

The following sample request adds a list with the name “Sample List”, having list owner name Robert, owner email [email protected], bounce email [email protected] and [email protected] as reply to address. Here is the sample request code to add a subscriber list.

$postData['list_name']          = 'Sample List';
$postData['list_owner_name']    = 'Robert';
$postData['list_owner_email']   = '[email protected]';
$postData['list_bounce_email']  = '[email protected]';
$postData['list_reply_email']   = '[email protected]';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.yourdomain.com/API/addList');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POST, count($postData));
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'APIToken: 343b1b831067b50e308e6bf93e0f06f0', 'Login: [email protected]'));
$data = curl_exec($ch);
if (curl_errno($ch)) {
   print "Error: " . curl_error($ch);
} else { 
   // Show me the result  
   print ($data); 
   curl_close($ch); 
}

Success Response

You’ll get the following Json response upon submitting valid information to add subscriber list.

Status value for successfully added list will be- “success”
Data Returned-"List ID" 

{"status":"success","response":{"List ID":"8"}}

Erroneous Response

When you submit request with inappropriate, incorrect information.

Status value for unsuccessful submission will be-"error” 
Data Returned- Text based message describing reason of unsuccessful response

{"status":"error","response":"Owner Email is required to create list"}
{"status":"error","response":"List Name is required to create list"}