News! SmartSender.io becomes Wooxy. Read a post from the CEO Arrow
Wooxy API v.3.0

Add A Contact To Email Black List

The Find Contact In Email Black List method allows you to find one or more contacts on the blacklist.

Important! In this method, pagination is used to display information about a large number of lists simultaneously. The offset is considered the starting point, and the limit is the endpoint.

Important! The parameter withRawLog is only available for the Enterprise Plan.

Request

POST
/v3/blacklist/find

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

Body Example

                                        {
        "email": "user@example.com",
        "rejectType": "hard",
        "withRawLog": false,
        "offset": 0,
        "limit": 2

}
                                    

Parameters

Title Type Default Description

email

optional
string

Email address. RFC validity not required.

records.rejectType

required
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.

withRawLog

optional
string false

Get the reason, why ESP hard bounced your contact. It is raw information that we receive from the target ESP.IMPORTANT That parameter is only available for the Enterprise Plan. Request the parameter activation from the support team via support@wooxy.com:

  • true: All data from the Email Black List Raw Log will be displayed;
  • false: No data from the Email Black List Raw Log will be displayed.

offset

optional
integer 0

nteger shift. Default value: 0.

limit

optional
integer 20

Integer limit. Default value: 20.

Response

                                        {
     "result":true,
     "data":[
      {
       "email":"user@example.com",
       "type":"hard",
       "rawLog": "Sample error text",
       "createdAt":"YYYY-MM-DD h:i:s",
       "expireAt":"YYYY-MM-DD h:i:s"
      }
     ],
     "totalCount":1,
     "offset":0,
     "limit":2
    }
                                    

Parameters

Title Type Description

result

boolean

The value indicates that the request was successfully and contact information was fetched from the account suppression list:

  • true: The request was successful.

data

array

An array of objects. Each object contains information on record regarding the requested contact in the account Email Black List.

data.email

string

Requested email address

data.type

string

Type of status of blacklisted contacts:

  • 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.

data.createdAt

string

Date when the requested contact was added to the suppression list.  
Date format: YYYY-MM-DD h:i:s.

data.expiredAt

string

Date, when suppression period for the requested contact will automaticaly expire.
Date format: YYYY-MM-DD h:i:s

data.rawLog

string

The reason, why ESP hard bounced your contact. It is raw information that we receive from the target ESP. IMPORTANT That parameter is only available for Enterprise Plan. Request the parameter activation from the support team via support@wooxy.com.

totalCount

integer

Total number of email records in account Email Black List.

offset

integer

Provided integer shift.

limit

integer

Provided integer limit.

Method Errors

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

“Argument email must be a non-empty string”

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

“Parameter offset must have a numeric value”

“Parameter limit must have a numeric value”

“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/find';
    
    $body = json_encode([
        "email" => "user@example.com",
        "rejectType" => "hard",
        "withRawLog" => false,
        "offset" => 0,
        "limit" => 2,
    ]);
    
    /**
     * 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;
    }