The Purge Visitors API helps teams comply with end-user bulk data deletion requests mandated by laws like GDPR and CCPA. This endpoint will delete users and all related user data identified by a set of emails, visitor IDs, or user IDs. Purge requests default to being processed 10 days after submission, however this delay can be configured via the delaySeconds parameter. The endpoint is limited to 100 visitor deletions per request. One of email, userId, or visitorId parameter is required to identify the user for data deletion.
curl --request POST \
--url https://api.sprig.com/v2/purge/visitors \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"delaySeconds": 86400,
"emails": [
"freddy@sprig.com",
"gustavo@sprig.com"
],
"userIds": [
"123456789"
],
"visitorIds": [
"8cd04391-fc36-4e9d-a9ac-bc77cd507ee0"
]
}
'{
"requestId": "“b9570865-0840-497d-9016-8b66575c9683”"
}Documentation Index
Fetch the complete documentation index at: https://docs.sprig.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer YOUR_API_KEY
At least one of “emails”, “visitorIds” or “userIds” needs to be non-empty in the request body. Only visitors that exist in the environment for which the API key is in the authorization header can be purged.
Seconds to wait before starting visitor data purging. This can be used as a safety measure in case the request needs to be canceled.
List of emails for which visitor data will be purged.
List of user IDs (external user IDs) for which visitor data will be purged.
List of visitor IDs for which visitor data will be purged.
OK
curl --request POST \
--url https://api.sprig.com/v2/purge/visitors \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"delaySeconds": 86400,
"emails": [
"freddy@sprig.com",
"gustavo@sprig.com"
],
"userIds": [
"123456789"
],
"visitorIds": [
"8cd04391-fc36-4e9d-a9ac-bc77cd507ee0"
]
}
'{
"requestId": "“b9570865-0840-497d-9016-8b66575c9683”"
}