Knowledgebase

Mark as Soft/Hard Bounce

Following API helps you mark specific contact status as Hard or Soft bounced through an application or custom code.

Required Parameters to Submit Request

Method (PUT)

Endpoint URL: http://www.mydomain.com/api/markAsBounced/{id}

Parameter Type Required

Description 

$id int Yes It refers to the contact ID, the status of the email address which you want to set as soft or hard bounced.
type text Yes The value of this parameter needs to be filled with the type of bounce you want to mark the contact as it should be either "hard" or "soft" (all small letters when writing the value)


Response Parameters

Parameter Type Response
status string Success or Error


Example Request (CURL)

<?php
$id = 62;
$params = [
    'type' => 'soft',
];
$api_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sampledomain.com/api/markAsBounced/$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);
?>


Success Response

{"status":"success","result":"Success: Contact successfully Updated"}
When submitting a valid API request, the system will return a success response.


Error Response

{"status":"error","result":"Error message goes here"}
For the invalid API request, response will reveal a text-based error message and status value as “Error”
PUT
/api/markAsBounced/{id}
Try it out