Ajouter un email

Post /blacklists

Paramètres :

Nom Description Type Obligatoire
type

Type de liste noire.

Valeurs disponibles :

  • bounces
  • unsubscribes
  • complaints
String Oui
email Adresse email à ajouter Int Oui

Réponse :

Nom Description Type
status success / failure String
Langage de programmation :

Exemple de requête :

							{
								"type": "bounces",
								"email": "email@example.com"
							}
							

Exemple de réponse :

							{
								"status": "success"
							}
							

Exemple de code :

								curl -X POST -d '{"type":"bounces","email":"email@domain.fr"
}' -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
							
require 'vendor/autoload.php';

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

try {
	
	$tipimail->getBlacklistsService()->addBounce('mail@example.com');
	
	$tipimail->getBlacklistsService()->addComplaint('mail@example.com');
	
	$tipimail->getBlacklistsService()->addUnsubscriber('mail@example.com');
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}