Add an email
Post /blacklists
Parameters:
Name | Description | Type | Mandatory |
---|---|---|---|
type |
Type of blacklist. Values available:
|
String | Yes |
Email address you want to add | Int | Yes |
Response:
Name | Description | Type |
---|---|---|
status | success / failure | String |
Programming language:
Request exemple:
{ "type": "bounces", "email": "email@example.com" }
Response exemple:
{ "status": "success" }
Code example:
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"; }