ServiceBell
Search…
Scrub Visitor Data
To satisfy GDRP, CCPA and similar requests
You can remove personally identifiable information (PII) for any website visitors that you have identified to ServiceBell using our Identification API.
For detailed information on the endpoints used, refer to the Organization Resource page.
Example Script
This script assumes Python3 and that the Python requests library has been installed.
scrub_visitors.py
1
import requests
2
3
4
# Setup re-usable values
5
# Note: The API Key value here is a fake example, storing
6
# in code is not recommended
7
base_url = "https://api.servicebell.com"
8
headers = {
9
"X-Api-Key": "vMLmfTyh.uN4C-cBme8iBfHqmMSkOwdlH_gdFipxglxEdOS7pKSU",
10
"Content-Type": "application/json"
11
}
12
13
14
# Get the Organization ID tied to your API Key
15
response = requests.get(f"{base_url}/public/api/v1/org",
16
headers=headers)
17
assert response.ok
18
19
# Save the Organization ID from the response
20
org_id = response.json()["id"]
21
22
23
# Setup the Visitors we'd like to search/scrub
24
# Can be customId's or email addresses
25
visitors = ["766554", "[email protected]"]
26
27
# POST request to redact the information for those two visitors
28
# Note: Takes a JSON body with a list of the visitor identities
29
url = f"{base_url}/public/api/v1/org/{org_id}/visitorscrub"
30
response = requests.post(url, json={"identities": visitors},
31
headers=headers)
32
assert response.ok
33
34
# Response body example:
35
# [{'customId': None,
36
# 'customMetadata': {'displayName': 'REDACTED'},
37
# 'id': '747a2bd8-d1aa-4736-beb5-1ebe142439f0',
38
# 'orgId': 1222456005},
39
# {'customId': None,
40
# 'customMetadata': {'displayName': 'REDACTED'},
41
# 'id': 'b81085e2-ae40-4303-9050-9c38784c7454',
42
# 'orgId': 1222456005}]
Copied!
Copy link