Last updated: Aug 02 2018

Area: Episerver Profile Store

Managing Blacklists

This topic describes how to manage blacklists using the Episerver Profile Store API.

In this topic

Blacklists

The blacklist object contains a fixed set of properties. For example:

{
  "BlacklistId": "aa95267c-2e27-4e82-9b5b-186c4f50c68b",
"Email": "john.doe@example.com",
"Scope": "commercesite" }

Property descriptions

  • BlacklistId [string]. The unique identifier of the blacklist object. Generated by the API.
  • Email [string]. The blacklisted email address. Specified by the developer.
  • Scope [string]. Optional. The unique identifier of the scope of this blacklist object; specified by the developer.
    • The ID should start with letter or number and contain letters, numbers and underlines (_) only.
    • The maximum length of Scope is 64 characters.
    • Do not use CAPITAL letters.

API methods

GET api/v1.0/blacklists/

  • See this page for information about using querystring parameters to filter results:
  • Returns HTTP 200 OK with all the blacklist items available in the environment.

Example of response body:

{
"total": 2,
"count": 2,
"items": [ { "BlacklistId": "62a2a514-a5f8-4e57-ae59-fe173167f8b7", "Email": "admin@example.com", "Scope": "DefaultScope" }, { "BlacklistId": "a9780654-80f8-41b5-a716-8da5950783bd", "Email": "admin@example.com", "Scope": "bacb5c80-191e-433f-9fb2-b07c47b862af" } ] }

POST api/v1.0/blacklists/

  • Returns HTTP 201 CREATED with the blacklist ID, email, and scope in the response body.
  • Returns 400 BAD REQUEST if an incorrect post body was specified.

Example of post body:

{
  "Email": "admin@example.com",
  "Scope": "DefaultScope"
}

Example of response body:

{
  "BlacklistId": "83b23656-247d-4bf1-805b-a86d83ce489d",
  "Email": "admin@example.com",
  "Scope": "DefaultScope"
}

DELETE api/v1.0/blacklists/{id}

  • Removes an existing blacklist item.
  • Returns:
    • HTTP 200 OK if the blacklist item was removed.
    • HTTP 404 NOT FOUND if the blacklist item does not exist.

DELETE api/v1.0/blacklists/{id}/ClearUserData

  • Removes data for specified blacklist item.
  • Returns:
    • HTTP 200 OK if the data for the blacklist item was removed.
    • HTTP 404 NOT FOUND if a profile with the email of the specified blacklist item does not exist.

Example of response body:

"Successfully removed data for blacklist item 77a6edaf-b10f-4f67-bc2a-35222dcd78d1"

Comments