Unsubscribes
These methods add addresses to your exclusion lists. Addresses added are automatically removed from the sends concerned.
| Method | List | Scope of the exclusion |
|---|---|---|
unsub_add | the account’s unsubscribed list | all future sends of the account |
unsub_global_add | the reseller account’s suppression list | future sends linked to the reseller account, sub-accounts included |
repoussoir_add | a specific exclusion list | sends that use this list |
To add an address to the unsubscribed list with a simple URL called in GET, without a JSON body, see also the unsubscribe management API.
These methods are all called with POST, with a JSON body that contains your api_key. Parameter tables do not repeat it. See the common rules.
Add an address to the unsubscribed list
Access point: https://www.mdworks.fr/api_http/unsub_add
This method adds an address to your account’s unsubscribed list. It will be removed from all your future sends.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
email | text | yes | the email address to unsubscribe |
Example of posted data:
{
"api_key": "YOUR_API_KEY",
"email": "address-to-unsubscribe@test.com"
}Response:
{"result": "ok"}To validate your tests, you can check in your account that the address has been taken into account. Note that it can take up to 10 minutes before the address is added to the list.
Errors:
| Message | Cause |
|---|---|
Error email is missing |
Add an address to the suppression list
Access point: https://www.mdworks.fr/api_http/unsub_global_add
This method is reserved for reseller accounts. It adds an address to the reseller account’s suppression list, which also applies to the sends of its sub-accounts.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
email | text | yes | the email address to suppress |
Example of posted data:
{
"api_key": "YOUR_API_KEY",
"email": "address-to-unsubscribe@test.com"
}Response:
{"result": "ok"}To validate your tests, you can check in your account that the address has been taken into account.
Errors:
| Message | Cause |
|---|---|
Error email is missing | |
Error need an admin account | the key is not a reseller account’s key |
Add an address to an exclusion list
Access point: https://www.mdworks.fr/api_http/repoussoir_add
This method adds an address to a specific exclusion list of your account, identified by its ID. The address will be excluded from sends that use this list.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
email | text | yes | the email address to add |
list_id | integer | yes | ID of the exclusion list, which must belong to the key’s account |
Example of posted data:
{
"api_key": "YOUR_API_KEY",
"email": "address-to-unsubscribe@test.com",
"list_id": 1234
}Response:
{"result": "ok"}Duplicates are ignored: if the address is already in the list, the call still returns ok.
Errors:
| Message | Cause |
|---|---|
Error email is missing | |
Error email is invalid | malformed address |
Error list_id is missing or is not numeric | |
Error this repoussoir list not owned by auth user | the exclusion list does not belong to your account |