Method: PUT
Endpoint: /api/markAsComplaint/{id}
Parameter | Type | Required |
Description |
$id | int | Yes | It refers to the contact ID, the status of which you want to turn to complaint/abuse. The contacts you mark as a complaint (abuse/spam) will no longer be able to receive emails from the system. |
Parameter | Type | Response |
status | string | Success or Error |
<?php
$id = 62;
$api_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sampledomain.com/api/markAsComplaint/$id");
//curl_setopt($ch, CURLOPT_POST, true);
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);
$response = curl_exec($ch);
print_r($response);
curl_close($ch);
?>
{"status":"success","result":"Success: Contact successfully Updated"}
{"status":"error","result":"Error message goes here"}