HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

blacklist and unblacklist

These operations generate or remove a blocklist entry in Optimizely Campaign.

Blocklist entries can be individual recipients (i.e., an email address) or wildcards, which block all recipients that match a defined pattern (e.g., a whole domain). Use a question mark (?) for a single character and an asterisk (*) for several characters.



If the blocklist entry pattern contains special characters, the pattern must be URL-encoded. For example, use the code %2f for a forward slash (/), %252f for a double slash (//), %2B for a plus sign (+) etc.

These operations are available in the form service.


NameMandatoryDefault valueDescription
bmPatternyes–If the blocklist entry refers to a single recipient, the email address can be set here. To blocklist multiple recipients, use wildcards as described above.
bmReasonnohttp-apiThe reason for blocking.

Return values



blocklist: Entry successfully added to the blocklist.
unblocklist: Entry successfully removed from blocklist.

ok: already_blacklisted

Only with bmVerbose=true: The entry already exists in the blocklist.


Authorization failed.

Error codes:
  • 501=wrong authentication tag
  • 502=wrong request IP
  • 503=wrong request method
  • 504=wrong protocol
  • 505=wrong recipient list
  • 506=wrong action
  • 507=action not found

  • **Note**: If a verification of the authentication tag does not solve the problem, contact [customer support](mailto:[email protected]). | |


    | No **bmRecipientId** was transmitted when using the form service. | |


    | A general error occurred. |

    Example 1


    The recipient with the ID [email protected] is blocked.

    Example 2


    The recipient with the ID [email protected] is removed from the blocklist.

    Example 3


    All recipients with an email address containing the domain example.com are blocked.

    What’s Next