Wooxy API v.3.0

Remove Contact From Email Black List

The Remove Contact From Email Black List method allows you to remove a contact from the blacklist.

Request

POST
https://api.wooxy.com/v3/blacklist/remove

IMPORTANT: Do not send more than 10 concurrent API requests.

Body Example

                                        {
    "email": "user@example.com",
    "rejectType": "hard"
}
                                    

Parameters

Title Type Default Description

email

required
string

Contact’s Email address. RFC validity not required.

rejectType

optional
string

One of the available reasons for placing the email address in the Email Black List.
WARNING: Minimum one rejectType (hard | complaint | list-unsubscribe ) is required:

  • hard: Used to indicate that address is invalid or non-existing;
  • complaint: Used to indicate that user complaint or asked to unsubscribe;
  • list-unsubscribe: Used to indicate that the user unsubscribed by the list-unsubscribed mechanism. NOTE: The list-unsubscribe mechanism unsubscribes contacts only from mailings, not from the Email channel.

Response

                                        {
 "result":true
}
                                    

Parameters

Title Type Description

result

boolean

The value indicates that the contact was successfully removed from the account Email Black List:

  • true: Contact was successfully removed.

 

Method Errors

                                        {
   "result": false,
   "errors": [
      "Error description text"
   ]
}
                                    
Error

“Argument email must be a non-empty string”

“Allowed rejectType is {allowed}, but {rejectType} given”

“Invalid authorization token!”

“Internal server error”

“Bad Request”

“no matches found for access token {accessToken}”

“user {id} not enabled”

“no data found for key {userId}”

“access token check failed for key\/secret $key\/$accessToken”

“Argument {argument} required”

Code Examples

PHP
                $accessToken = "YOUR_API_KEY";
$url         = 'https://api.wooxy.com/v3/blacklist/remove';

$body = json_encode([
    "email"      => "user@example.com",
    "rejectType" => "hard",
]);

/**
 * Request Example
 */
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_INFILESIZE, null);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Access-Token: $accessToken",
    'Content-Type: application/json',
    'Content-Length: ' . strlen($body),
]);

$result = curl_exec($ch);
if ($result === false) {
    echo 'cURL error:' . curl_error($ch) . PHP_EOL;
} else {
    echo strval($result) . PHP_EOL;
}