Add an Email
This request lets you add an email to the unsubscribe list.
URL
POST https://api.mailpartner.fr/v1/unsubscribe/add
Required Parameters
Name
Value
apiKey
email
Email to add
Optional Parameters
Name
Value
_format
json or xml
Request
<?php
// Prepare data for POST request
$fields = array(
'apiKey'=> 'YOUR API KEY',
'email'=> 'xxxx@www.com'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,'http://api.mailpartner.fr/v1/unsubscribe/add');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS,json_encode($fields));
$result = curl_exec($curl);
curl_close($curl);
// Process your response here
echo $result;
?>Response
Errors
Error Codes
Response Code
Message
1
The API key is required
3
The message ID is required
9
The email is invalid
10
Invalid API key
200
Everything went fine!
Last updated