Get List Custom Fields

Make use of API function to retrieve the custom fields belonging to specific list. Here is how it works. 

Required Parameters to Submit Request 

  • API Token- Token that you have generated using generate API token. Make sure you are using the most recent one.
  • End Point- End point for the Get List Custom Field API would appear$id. Like the pattern of the API End Point, it has Mumara Campaigns URL, function name you are requesting and the $id to pass through.

Method (GET)

Required to Get List Custom Fields 




$id here refers to List ID to retrieve custom fields belonging to that specific list. To know the id of particular list you want to retrieve the custom fields of, go to View Lists page and click Edit from the Actions. The Edit page URL has the list ID and it appears like, in this URL 4 is the list ID.  

Sample Request

$api_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxx';
$id = 5;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$id");
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
curl_close ($ch);

Success Response 

Successfully posted API call will return the information related to the custom fields that belong to the list-id you have provided, information would include Custom Filed ID, Field Name, Field Type, List Value, Field Order, Date of Creation 

{"status":"success","result":"Success: Custom fields of the List"}

Error Response 

In case of providing a wrong list ID or list ID that doesn't exist at all, the error response will appear that follows a pattern in almost all the API responses.   

{"status":"error","result":"Error message goes here"}
Try it out