Rep.ai
  • 5 Minute Quick Start
  • Controlling the Widget
  • Custom Visitor Identities
  • Listening to Events
  • Examples of Custom Behavior
  • Security and Spam Prevention
  • Virtual Backgrounds
  • How to Identify Contacts who Click Through Emails to Your Site from Email Sequencers
  • Troubleshooting
    • Browser Compatibility
    • Notifications
    • Content-Security-Policy (CSP)
    • Firewalls and VPNs
    • Support
    • Scheduler
  • Integrations
    • Acuity
    • Calendly
    • Chili Piper
    • Clearbit
    • Google Calendar
    • HubSpot
    • Intercom
    • Outreach
    • Salesforce
    • Shopify
    • Slack
    • Microsoft Teams
    • Zapier
    • Zendesk
    • Zoom
    • Outlook Calendar
    • Salesloft
    • Gong
  • API
    • Introduction
    • Authentication
    • Scrub Visitor Data
    • Nightly Data Dumps
  • API Resources
    • Organization
  • ⚠️Experimental
    • Performance
    • Overview
    • Zendesk App
  • Outbound (Dialer)
    • Getting Started with Rep.ai Outbound (Dialer)
    • How to Create and Manage Custom Columns (Properties) in Rep.ai Outbound (Dialer)
    • How to Mark a Number as "Do Not Call" in Rep.ai Outbound (Dialer)
    • FAQs
  • SPOTLIGHT
    • How to set high-intent page preferences for intent scoring
    • How to toggle auto-create companies based on visitor identification
    • CRM Fields for Rep.ai Influence (Contact)
    • CRM Fields for Rep.ai Influence (Account)
  • ANALYTICS
    • Metric definitions
Powered by GitBook
On this page

Was this helpful?

  1. API

Scrub Visitor Data

To satisfy GDRP, CCPA and similar requests

PreviousAuthenticationNextNightly Data Dumps

Last updated 5 months ago

Was this helpful?

You can remove personally identifiable information (PII) for any website visitors that you have identified to Rep.ai using our .

For detailed information on the endpoints used, refer to the page.

This script assumes Python3 and that the Python library has been installed.

scrub_visitors.py
import requests


# Setup re-usable values
# Note: The API Key value here is a fake example, storing 
#       in code is not recommended
base_url = "https://api.rep.ai"
headers = {
    "X-Api-Key": "vMLmfTyh.uN4C-cBme8iBfHqmMSkOwdlH_gdFipxglxEdOS7pKSU",
    "Content-Type": "application/json"
}


# Get the Organization ID tied to your API Key
response = requests.get(f"{base_url}/public/api/v1/org", 
                        headers=headers)
assert response.ok

# Save the Organization ID from the response
org_id = response.json()["id"]


# Setup the Visitors we'd like to search/scrub
# Can be customId's or email addresses
visitors = ["766554", "[email protected]"]

# POST request to redact the information for those two visitors
# Note: Takes a JSON body with a list of the visitor identities
url = f"{base_url}/public/api/v1/org/{org_id}/visitorscrub"
response = requests.post(url, json={"identities": visitors},
                         headers=headers)
assert response.ok

# Response body example:
# [{'customId': None,
#   'customMetadata': {'displayName': 'REDACTED'},
#   'id': '747a2bd8-d1aa-4736-beb5-1ebe142439f0',
#   'orgId': 1222456005},
#  {'customId': None,
#   'customMetadata': {'displayName': 'REDACTED'},
#   'id': 'b81085e2-ae40-4303-9050-9c38784c7454',
#   'orgId': 1222456005}]

Identification API
Organization Resource
requests