Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

BlacklistWebservice

Query, update or remove blocklist entries in Optimizely Campaign, and determine if an email address is blocked.

MethodDescription
addAdds an entry to the blocklist.
addAllAdds multiple entries to the blocklist.
areBlacklistedQueries whether multiple email addresses are blocked.
containsQueries whether an entry is contained in the blocklist.
containsAllQueries whether multiple entries are contained in the blocklist.
getAllAdvancedQueries all blocklist entries.
getAllAdvancedFlatQueries all blocklist entries.
getAllEntriesQueries all blocklist entries.
getColumnNamesQueries the column names of each blocklist entry.
getCountCounts all available blocklist entries.
getCreatedQueries the creation date of a blocklist entry.
getDataSetQueries the data of each blocklist entry.
getDataSetFlatQueries the values of each blocklist entry.
getFirstMatchingEntryQueries the first blocklist entry that matches an email address.
getReasonQueries the reason for a blocklist entry.
isBlacklistedQueries whether an email address is blocked.
removeDeletes an entry from the blocklist.
removeAllDeletes multiple entries from the blocklist.

Entries vs. email addresses

Note that there is a difference between a blocklist entry and a blocked email address. Since blocklisting can be done using wildcards (see next section), a blocklist entry may block several email addresses. To query the first matching blocklist entry for an email address, use the getFirstMatchingEntry method.

A single email address may be blocked by several blocklist entries. So, if you like to make sure that an email address is not blocked any more, the methods getFirstMatchingEntry  and remove have to be invoked until getFirstMatchingEntry returns NULL.

Wildcards

An entry can contain the following wildcards:

  • An * (asterisk) represents one or more characters.
  • A ? represents a single character.

Examples