Skip to content
Unsubscribes

Unsubscribes

By Loïc Bresler 3 min read

These methods add addresses to your exclusion lists. Addresses added are automatically removed from the sends concerned.

MethodListScope of the exclusion
unsub_addthe account’s unsubscribed listall future sends of the account
unsub_global_addthe reseller account’s suppression listfuture sends linked to the reseller account, sub-accounts included
repoussoir_adda specific exclusion listsends 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:

ParameterTypeRequiredDescription
emailtextyesthe 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:

MessageCause
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:

ParameterTypeRequiredDescription
emailtextyesthe 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:

MessageCause
Error email is missing
Error need an admin accountthe 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:

ParameterTypeRequiredDescription
emailtextyesthe email address to add
list_idintegeryesID 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:

MessageCause
Error email is missing
Error email is invalidmalformed address
Error list_id is missing or is not numeric
Error this repoussoir list not owned by auth userthe exclusion list does not belong to your account
Last updated on