Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
contact:
email: support@sprig.com
name: Support
description: Sprig is a continuous product research tool that helps you automatically capture the user insights you need to consistently improve your product, user experience, marketing, and more.
title: Sprig Purge API
version: 2.2.1
servers:
- url: https://api.sprig.com
tags:
- name: Purge
paths:
/v2/purge/visitors:
post:
description: '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.'
operationId: post-v2-purge-visitors
parameters:
- description: Bearer YOUR_API_KEY
in: header
name: Authorization
required: true
schema:
type: string
requestBody:
content:
application/json:
examples:
example-1:
value:
delaySeconds: 86400
emails:
- freddy@sprig.com
- gustavo@sprig.com
userIds:
- '123456789'
visitorIds:
- 8cd04391-fc36-4e9d-a9ac-bc77cd507ee0
schema:
properties:
delaySeconds:
description: Seconds to wait before starting visitor data purging. This can be used as a safety measure in case the request needs to be canceled.
type: integer
emails:
description: List of emails for which visitor data will be purged.
items:
type: string
type: array
userIds:
description: List of user IDs (external user IDs) for which visitor data will be purged.
items:
type: string
type: array
visitorIds:
description: List of visitor IDs for which visitor data will be purged.
items:
type: string
type: array
type: object
description: 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.
responses:
'200':
content:
application/json:
examples:
Successful Response:
value:
requestId: “b9570865-0840-497d-9016-8b66575c9683”
schema:
properties:
requestId:
type: string
type: object
description: OK
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
summary: Purge Visitors
tags:
- Purge
components:
responses:
'500':
description: Something went wrong on Sprig's side. These are very rare :)
'403':
description: You may have an invalid or missing API key and you should check your authorization header. There is no message with this status code.
'400':
content:
application/json:
schema:
properties:
error:
type: string
description: Bad Request
'429':
description: Your application has made too many requests in too short a time.
'404':
description: Not Found
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: Authorization
description: Use `API-Key YOUR_API_KEY` for v2 endpoints or `Bearer YOUR_API_KEY` for export endpoints.
x-readme:
explorer-enabled: true
proxy-enabled: true
samples-enabled: true