Remove all contacts from address book

The RemoveAllContactsFromAddressBook method removes all contacts in a specified address book.

Removing the contacts will not cause the contact to be suppressed unless you specify this in the request.

Parameters

username string This is the username from your API key. It is in the format of an email address and will look similar to apiuser-908709770324@apiconnector.com required
password string This is the password from your API key. required
addressBookId int This is the ID of the addressbook you want to remove contacts from. required
preventAddressbookResubscribe boolean If this is set to true, the contacts will be added to the address book specific suppression list. optional
totalUnsubscribe boolean If this is set to true the contacts will be added to the account suppression list. optional

Return values

None.

Error responses

  • ERROR_ADDRESSBOOK_NOT_FOUND
  • ERROR_APIUSAGE_EXCEEDED
  • ERROR_INVALID_LOGIN
  • ERROR_PARAMETER_INVALID
  • ERROR_SYSTEM_SERVICETEMPORARILYUNAVAILABLE
  • ERROR_UNKNOWN

Request

Example of use in C# .NET

Sample request

Sample response

Get started with dotMailer:

Small & Medium businesses Large businesses
Call the team on 0845 337 9170
What our clients say:

“dotMailer has changed our complete marketing process for the better. It's one of the easiest apps I have used and allows us to do things we have only dreamed of before."

Amberley Shermon, Cazenove+Loyd