Skip to content

Erase what the website widget remembers about one signed-in visitor

POST
/contacts/erase-widget-visitor
curl --request POST \
--url https://app.surveyrock.com/api/v1/contacts/erase-widget-visitor \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: example' \
--data '{ "userId": "example", "email": "example", "websiteId": "example" }'

Deletes, on every Website of the workspace (or the one named), the record the website widget keeps for a signed-in visitor: when each widget was shown, closed or answered. Give the user ID your site signs; if your site signs only an email, give that. The visitor’s answers are not touched.

Idempotency-Key
required
string
>= 1 characters <= 128 characters

1 to 128 characters, chosen by the caller. A retry with the same key and body replays the first response instead of applying the write twice; the same key with a different body is a 409

Media typeapplication/json
object
userId

The user ID your site signs

string
<= 255 characters
email

The email your site signs, when it signs no user ID

string
<= 254 characters
websiteId

Only this Website (all of the workspace’s Websites when absent)

string
Examplegenerated
{
"userId": "example",
"email": "example",
"websiteId": "example"
}

Erased: deleted is how many records were deleted (0 when there was nothing to erase)

Neither userId nor email given

No such Website in this workspace