List emails

Post /blacklists/list

Parameters:

Name Description Type Mandatory
type

Type of blacklist.

Values available:

  • bounces
  • unsubscribes
  • complaints
String Yes
list Available for unsubscribe and complaints, if you have create a custom list. By default all unsubscribe or complaints will be returned) String No
pageSize Number of item returned Int No
page Page number Int No
order Order of the return (0 (ASC) or 1 (DESC) / based on date value) Int No

Response:

Name Description Type
type

An array with information about each email on blacklist

Name Description Type
email Email address String
date Date of add Int
reason String
list List Name. Available only for unsubscribers String
Array
total Total of items on the blacklist Int
Programming language:

Request exemple:

							{
								"pageSize": 10,
								"page": 1,
								"order": 1
							}
							

Response exemple:

							{
								"bounces": [
									{
										"email": "email1@example.com",
										"date": 1438765958,
										"reason": ""
									},
									{
										"email": "email2@example.com",
										"date": 1438765958,
										"reason": ""
									}
								],
								"total": 200
							}
							

Code example:

								curl -d '{"page":1,"pageSize":10}' -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/blacklists/list/unsubscribers
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$list = null;
	$pageSize = 2;
	$page = 1;
	$order =1;
	
	$result = $tipimail->getBlacklistsService()->getBounces($pageSize, $page, $order);
	var_dump($result);
	
	$result = $tipimail->getBlacklistsService()->getComplaints($list, $pageSize, $page, $order);
	var_dump($result);
	
	$result = $tipimail->getBlacklistsService()->getUnsubscribers($list, $pageSize, $page, $order);
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}