List campaigns for address book

The ListCampaignsForAddressBook method retrieves a filtered list of campaigns that have been sent to the specified address book. This can be useful in ensuring that you do not send the same campaign to the same contacts.

Guidance Notes

Remember that the filter is based on the address book so if the contacts in the address book are changed it will show the address book as still having been sent the campaign even though the contacts within might not have received that particular campaign.

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 in your dotMailer account that you wish to query against. required

Return values

The result is an array of APICampaign objects, each consisting of the following:

fromName string The name the email will be set to be from.
htmlContent string The contents of the HTML campaign.
id int The campaign ID.
name string The name of the campaign.
plaintextContent string The contents of the Plain Text version of the campaign.
replyAction Unset or WebMailForward or Webmail or Delete.
replyToAddress The email address replies should be forwarded to.
status NotSet or Unsent or Sending or Sent or Paused or Cancelled or RequiresApproval or Requires SMSApproval or Triggered.
subject string The subject line of the email.

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