Delete Contact By Email

Method: DELETE
Endpoint: /api/deleteContactByEmail/{email}/{recursive}

Flag Type Required Description
recursive 0, 1 (default: 0) No Delete first entry or all contacts having this email address

0 = Delete first result of the operation
1 = Delete all contacts having this email address

Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result 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/deleteContactByEmail/';

//Contact email
$email = '[email protected]/';

//flag recursive
$recursive = '1';

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.$email.$recursive);
curl_setopt($ch, CURLOPT_POST, true);
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": "success",
    "result": "Success: Contact has been successfully deleted."
Status value of the success response will be "Success"

Example Error Response (JSON)

    "status": "error",
    "result": "Error: Contact doesn't exist."

Possible Errors

  • Invalid format
  • No contact found
  • Access Denied
Try it out