exclude method

The method excludes the contact's email or phone number from one or several lists. In contrast to the unsubscribe method, it does not mark the contact as «unsubscribed», and it can be included in the list again later using the subscribe method.

We recommend using the exclude method when the subscription/unsubscription is managed on the sender's initiative (that is you, the author of the campaign list), and the unsubscribe method in the case when contact wants to unsubscribe on his own.

Principle of use

Syntax and URL to call the method
exclude (string contact_type, string contact [, string list_ids])
https://api.selzy.com/en/api/exclude?format=json&api_key=KEY&[email protected]&contact_type=
api_key * API access key.
contact_type * The type of the contact to be excluded is either 'email' or 'phone'.Examples:

contact * Email or phone being excluded.Examples:

[email protected]
list_ids List codes separated by comma from which contacts are being excluded. If it is not specified, contacts will be excluded from all lists. Codes of the lists can be obtained by calling the getLists method. They match the codes used in the subscription form.Examples:

Return value
There will be an empty object in case of success. If any errors or warnings occur, they will be returned in the standard manner.
In case of an attempt to exclude an address from the list in which such address is absent, the following error will be returned:

  "error":"Contact "[email protected]" not found",

Did we answer to your question?