Knowledgebase

Update List

Following section discusses updating of the contact list using API services, there is also a sample request with the json based responses it returns with.

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_id

Required

ID of the particular list you want to update

list_name

Required

Name of the list another requirement to submit the request successfully

list_group_name

Required

Update group name for the particular list

list_group_id

Required

Update group ID for the particular list

list_owner_name

Required

Update the name of the person who owns the list

list_reply_to_email

Required

Update reply to email for the list

list_bounce_email

Required

Update bounced email information

list_owner_email

Required

Email of the person who owns the list, update accordingly

Sample Request

Following sample request updates list owner name, list owner email, bounce email, reply email for the list with the List ID 3.

$postData['list_id']            =  3;
$postData['list_name']          = 'Example List';
$postData['list_owner_name']    = 'Sample';
$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/updateList');
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

Upon submitting valid request

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

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

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

If the list ID is incorrect or not mentioned

{"status":"error","response":"List not available to update"}

When the list name isn’t mentioned 

{"status":"error","response":"List Name is required to update list"}