Knowledgebase

Update Contact List

Method: PUT
Endpoint: /api/updateList/{id}

Parameters

Parameter Type Required

Description 

list_name string No Update contact list name
group_name string No Update contact list group
owner_name string No Update owner name
owner_email string No Update owner email address
reply_email string No Update reply email address
bounce_email string No Update return-path email address where you want to receive bounced emails
additional_field string No Re-assign custom fields. If skipped then no change will apply to the pre-assigned custom fields
response 0, 1 (default: 0) No Get full response of the operation


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation


Example Request (CURL)

<?php

// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name
$list_id	=	'22';

// API Endpoint
$endpoint	=	'/api/updateList/';

//parameters
$params  =
    [
        'list_name'    => 'Test List via Api',
        'owner_name'   => 'John Lee',
        'owner_email'  => '[email protected]',
        'reply_email'  => '[email protected]',
        'group_name'   => 'Test',
        'bounce_email' => '[email protected]',
        'response'       => 1,
        'additional_fields' => 'first_name'
    ];

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.$list_id);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Executing cURL
$output = curl_exec($ch);

// Printing Output
echo "<pre>";
print_r(json_decode($output,true));

// Closing cURL
curl_close ($ch);

?>


Example Response (CURL)

 {
    "status": "success",
    "result": "Success: List has been successfully updated.",
    "response": {
        "id": 23,
        "name": "Test List via Api",
        "group_id": 5,
        "owner_name": "John Lee",
        "owner_email": "[email protected]",
        "reply_email": "[email protected]",
        "bounce_email_id": 3,
        "user_id": 4,
        "created_at": "2019-05-13 09:58:18",
        "updated_at": "2019-05-14 10:52:13",
        "custom_fields": {
            "2": "First Name"
        }
    }
 }
Status value of the success response will be "success"


Example Error Response (CURL)

 {
    "status": "error",
    "result": "Error: Group doesn't exist."
 }

 

Possible Errors

  • Invalid contact list id
  • Unauthorized domain in owner/bounce email address
  • Bounce email address doesn't exist. Add this bounce address to Mumara first
  • Custom field doesn't exist
  • Access Denied
PUT
/api/updateList/{id}
Try it out