Add Custom Field to List


Add Custom Field to List


Make use of the API function to add custom field in some particular list. The section describes the Json document formation for adding the custom field into a list; a sample request and its responses at the end of this section.


Required to Submit Json Request



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 being called (Post)


Path to the API file being called ('http//


Field Details







Provide the ID of the list to which you want to add custom field to



What is the custom field ID you want to add to particular list

Sample Request


The following sample request adds custom field ID number 4 to the field with the ID 5. Here is the sample request.


$postData['list_id']            = '5';
$postData['custom_field_id']    = '4';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http//');
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: 343b1b831066a40e308e0af92e0f06f0', 'Login:'));

$data = curl_exec($ch);
if (curl_errno($ch)) {

print "Error: " . curl_error($ch);

} else {

// Show me the result
print ($data);


Success Response


Upon submitting valid request with correct list ID and custom field ID, you will get your custom field added to the provided list. 


Status value for successfully added subscriber will be- “success”
Data Returned-"Text Message Mentioning The Custom Field ID being added to the List ID" 
Following is the example of a success response.

{"status":"success","response":{"Custom Field 4 added to list 5"}};


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
Some erroneous responses are as follows.

{"status":"error","response":"Custom field id is required to add custom field to list."}
{"status":"error","response":"List id is required to add custom field to list"}
{"status":"error","response":"Custom Field 4 added to list 5"}

Have more questions? Submit a request


Powered by Zendesk