Delete Suppressed

Method: DELETE
Endpoint: /api/deleteSuppressed/{type}


Parameter Type Required Description
type email, ip, domain Yes Select type of suppression
id int No id of the suppressed entry
reference string No Get suppressed records according to this reference you want to delete
user_id int No Get suppressed records of a particular user

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)


// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	''; // Your Mumara Domain Name

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

$type = 'email';

$params = array (
    'reference'	    => 'added via api',

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

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

// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT);

// Closing cURL
curl_close ($ch);

Example Response (JSON)

    "status": "error",
    "result": "Error: Record has been successfully deleted."
Status value of the success response will be "Success"

Example Error Response (JSON)

    "status": "error",
    "result": "Error: Records do not exist."

Possible Errors

  • Invalid format
  • Access Denied
Try it out