On this page

User Data Deletion Requests API

How to submit and process user data deletion requests in Statsig to comply with GDPR, CCPA, and other privacy regulations across SDK and console data.

User data deletion requests are for Enterprise contracts only. Contact the support team, your sales contact, or the Slack community to enable Enterprise features. Statsig currently only supports deleting data for unit type user_id.

GDPR and similar laws may require that you delete a user's data when they request it. To support deletion requests, Statsig provides this API.

How to use the API

All requests must include the STATSIG-API-KEY field in the header. The value should be a Server API Key, which you can create in the Project Settings on console.statsig.com/api_keys.

Send a deletion request

Data deletion requests take the following parameters:

  • unit_type: The unit type corresponding to the IDs you want deleted. Currently only user_id is supported.
  • ids: A comma-separated list of the IDs to delete data for.
  • delimiter (optional): If your IDs contain commas, specify a different delimiter here.
  • request_id (optional): A unique request ID from your system. If omitted, Statsig provides one in the response. The ID must be unique; otherwise the request fails with a 400 error.
bash
curl \
  --header "statsig-api-key: <YOUR-API-KEY>" \
  --header "Content-Type: application/json" \
  --request POST \
  --data '{"unit_type": "user_id", "ids": "1,2,3", "request_id": "test_request_1"}' \
  "https://api.statsig.com/v1/delete_user_data"

Response: {"request_id":"test_request_1"}

Check deletion status

Using the request ID, check the status of a deletion.

Input: request_id: the ID of the request.

Output:

  • COMPLETE: data has been deleted
  • PENDING: data is still pending deletion
  • UNKNOWN: invalid request ID
bash
curl \
  --header "statsig-api-key: <YOUR-API-KEY>" \
  --header "Content-Type: application/json" \
  --request POST \
  --data '{"request_id": "test_request_1"}' \
  "https://api.statsig.com/v1/get_delete_user_data_request_status"

Response: PENDING

Deletion SLA

Statsig doesn't handle data deletion requests synchronously. Statsig batches requests and performs mass deletions periodically. Data is guaranteed to be deleted within 30 days of receiving a request.

Important notes

  • After a data deletion request has been submitted, it can't be canceled.
  • After data has been deleted, Statsig no longer stores the set of IDs that data was deleted for, because those IDs may constitute personally identifiable information.

Was this helpful?