Mixpanel Compliance connector
Bearer TokenAnalyticsConnect to Mixpanel's GDPR/CCPA compliance API to submit and track end-user data deletion (right to erasure) and data retrieval (subject access) requests....
Mixpanel Compliance connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Set up the connector
Section titled “Set up the connector”Register your Mixpanel Compliance credentials with Scalekit so it can authenticate requests on your behalf. You do this once per environment.
Dashboard setup steps
Register your Mixpanel GDPR/CCPA compliance token with Scalekit so it can authenticate and proxy data deletion and retrieval requests on behalf of your users. This connector uses a Bearer token — there is no redirect URI or OAuth flow.
-
Find your Mixpanel data residency region
Mixpanel hosts projects in three separate data residency regions. Before generating a token, confirm which region your project lives in:
Region API host United States (default) mixpanel.com/apiEuropean Union eu.mixpanel.com/apiIndia in.mixpanel.com/api -
Get your GDPR compliance token
-
Sign in to Mixpanel and go to Settings → Profile → Data & Privacy.
-
Under GDPR API, copy the OAuth Token for GDPR APIs. If none exists yet, click Reset to generate one.

-
-
Create a connection in Scalekit
- In the Scalekit dashboard, go to AgentKit → Connections → Create Connection.
- Search for Mixpanel Compliance and click Create.
- Note the Connection name — use this as
connection_namein your code (e.g.,mixpanelcompliance).
-
Add a connected account
Connected accounts link a specific user identifier in your system to a GDPR compliance token and region. Add them via the dashboard for testing, or via the Scalekit API in production.
Via dashboard (for testing)
- Open the connection and click the Connected Accounts tab → Add account.
- Fill in Your User’s ID, the GDPR Token, and select the matching Data Residency.
- Click Save.
Via API (for production)
// US region (default) — omit `domain` or set it to 'mixpanel.com/api'await scalekit.connect.upsertConnectedAccount({connectionName: 'mixpanelcompliance',identifier: 'user@example.com',credentials: {token: 'your-gdpr-compliance-token',domain: 'mixpanel.com/api',},})// EU regionawait scalekit.connect.upsertConnectedAccount({connectionName: 'mixpanelcompliance',identifier: 'eu-user@example.com',credentials: {token: 'your-eu-gdpr-compliance-token',domain: 'eu.mixpanel.com/api',},})# US region (default) — omit domain or set it to "mixpanel.com/api"scalekit_client.connect.upsert_connected_account(connection_name="mixpanelcompliance",identifier="user@example.com",credentials={"token": "your-gdpr-compliance-token","domain": "mixpanel.com/api",},)# EU regionscalekit_client.connect.upsert_connected_account(connection_name="mixpanelcompliance",identifier="eu-user@example.com",credentials={"token": "your-eu-gdpr-compliance-token","domain": "eu.mixpanel.com/api",},)
-
-
Make your first call
Section titled “Make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'mixpanelcompliance'const identifier = 'user_123'// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'mixpanelcompliance_gdpr_deletion_status',toolInput: { tracking_id: 'YOUR_TRACKING_ID', project_token: 'YOUR_PROJECT_TOKEN' },})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "mixpanelcompliance"identifier = "user_123"# Make your first callresult = actions.execute_tool(tool_input={"tracking_id":"YOUR_TRACKING_ID","project_token":"YOUR_PROJECT_TOKEN"},tool_name="mixpanelcompliance_gdpr_deletion_status",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Cancel gdpr deletion — Cancel a pending GDPR/CCPA data deletion request before Mixpanel begins permanently erasing the data
- Create gdpr deletion, gdpr retrieval — Permanently delete ALL data Mixpanel holds for the given distinct_ids — every event and profile property, across all time
- Status gdpr deletion, gdpr retrieval — Check the status of a GDPR/CCPA data deletion request previously created with ‘mixpanelcompliance_gdpr_deletion_create’
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
mixpanelcompliance_gdpr_deletion_cancel#Cancel a pending GDPR/CCPA data deletion request before Mixpanel begins permanently erasing the data. Returns no content on success. Cancellation can fail once the deletion has already progressed too far to stop — check 'mixpanelcompliance_gdpr_deletion_status' first if you're unsure, and be prepared for this call to be rejected once a deletion is underway.2 params
Cancel a pending GDPR/CCPA data deletion request before Mixpanel begins permanently erasing the data. Returns no content on success. Cancellation can fail once the deletion has already progressed too far to stop — check 'mixpanelcompliance_gdpr_deletion_status' first if you're unsure, and be prepared for this call to be rejected once a deletion is underway.
project_tokenstringrequiredYour Mixpanel Project Token (Project Settings > Overview), identifying which project this request applies to. Sent as the 'token' query parameter. This is distinct from the GDPR Compliance Token used to authenticate this connection.tracking_idstringrequiredThe tracking ID returned by 'mixpanelcompliance_gdpr_deletion_create' when the deletion request was created.mixpanelcompliance_gdpr_deletion_create#Permanently delete ALL data Mixpanel holds for the given distinct_ids — every event and profile property, across all time. This is irreversible once processing completes, and per Mixpanel's GDPR/CCPA documentation it can take up to 30 days to fully propagate through Mixpanel's systems. Only call this to fulfill a genuine right-to-erasure request — never speculatively or for testing. Use 'mixpanelcompliance_gdpr_deletion_status' with the returned tracking_id to monitor progress, and 'mixpanelcompliance_gdpr_deletion_cancel' to attempt to stop it before processing starts.3 params
Permanently delete ALL data Mixpanel holds for the given distinct_ids — every event and profile property, across all time. This is irreversible once processing completes, and per Mixpanel's GDPR/CCPA documentation it can take up to 30 days to fully propagate through Mixpanel's systems. Only call this to fulfill a genuine right-to-erasure request — never speculatively or for testing. Use 'mixpanelcompliance_gdpr_deletion_status' with the returned tracking_id to monitor progress, and 'mixpanelcompliance_gdpr_deletion_cancel' to attempt to stop it before processing starts.
distinct_idsarrayrequiredThe Mixpanel distinct_ids whose data will be PERMANENTLY deleted. This cannot be undone. Mixpanel accepts at most 1999 distinct_ids per deletion request — split larger batches into multiple calls.project_tokenstringrequiredYour Mixpanel Project Token (Project Settings > Overview), identifying which project to run this request against. Sent as the 'token' query parameter. This is distinct from the GDPR Compliance Token used to authenticate this connection.compliance_typestringoptionalThe privacy regulation this request is being made under. Defaults to 'GDPR' when omitted.mixpanelcompliance_gdpr_deletion_status#Check the status of a GDPR/CCPA data deletion request previously created with 'mixpanelcompliance_gdpr_deletion_create'. The response's status field is one of: PENDING, STAGING, STARTED, SUCCESS, FAILURE, REVOKED, NOT_FOUND, or UNKNOWN. Deletions can take up to 30 days to reach SUCCESS. While a request is still PENDING or STAGING it may still be cancellable via 'mixpanelcompliance_gdpr_deletion_cancel'.2 params
Check the status of a GDPR/CCPA data deletion request previously created with 'mixpanelcompliance_gdpr_deletion_create'. The response's status field is one of: PENDING, STAGING, STARTED, SUCCESS, FAILURE, REVOKED, NOT_FOUND, or UNKNOWN. Deletions can take up to 30 days to reach SUCCESS. While a request is still PENDING or STAGING it may still be cancellable via 'mixpanelcompliance_gdpr_deletion_cancel'.
project_tokenstringrequiredYour Mixpanel Project Token (Project Settings > Overview), identifying which project to check this request against. Sent as the 'token' query parameter. This is distinct from the GDPR Compliance Token used to authenticate this connection.tracking_idstringrequiredThe tracking ID returned by 'mixpanelcompliance_gdpr_deletion_create' when the deletion request was created.mixpanelcompliance_gdpr_retrieval_create#Create a GDPR or CCPA Subject Access Request (SAR) for one or more Mixpanel distinct_ids. Mixpanel asynchronously compiles an export of every event and profile property it holds for the given distinct_ids so you can fulfill a data subject's access request. This call only queues the export — use 'mixpanelcompliance_gdpr_retrieval_status' with the returned tracking_id to poll for completion and get the download details.4 params
Create a GDPR or CCPA Subject Access Request (SAR) for one or more Mixpanel distinct_ids. Mixpanel asynchronously compiles an export of every event and profile property it holds for the given distinct_ids so you can fulfill a data subject's access request. This call only queues the export — use 'mixpanelcompliance_gdpr_retrieval_status' with the returned tracking_id to poll for completion and get the download details.
distinct_idsarrayrequiredThe Mixpanel distinct_ids to retrieve all held data for. Mixpanel accepts at most 2000 distinct_ids per retrieval request — split larger batches into multiple calls.project_tokenstringrequiredYour Mixpanel Project Token (Project Settings > Overview), identifying which project to run this request against. Sent as the 'token' query parameter. This is distinct from the GDPR Compliance Token used to authenticate this connection.compliance_typestringoptionalThe privacy regulation this request is being made under. Defaults to 'GDPR' when omitted.disclosure_typestringoptionalThe category of data to disclose. Required by Mixpanel when compliance_type is CCPA; ignored for GDPR requests.mixpanelcompliance_gdpr_retrieval_status#Check the status of a GDPR/CCPA data retrieval (Subject Access Request) previously created with 'mixpanelcompliance_gdpr_retrieval_create'. The response's status field is one of: PENDING, STAGING, STARTED, SUCCESS, FAILURE, REVOKED, NOT_FOUND, or UNKNOWN. Poll this until the status reaches SUCCESS (the export is ready), FAILURE, or REVOKED.2 params
Check the status of a GDPR/CCPA data retrieval (Subject Access Request) previously created with 'mixpanelcompliance_gdpr_retrieval_create'. The response's status field is one of: PENDING, STAGING, STARTED, SUCCESS, FAILURE, REVOKED, NOT_FOUND, or UNKNOWN. Poll this until the status reaches SUCCESS (the export is ready), FAILURE, or REVOKED.
project_tokenstringrequiredYour Mixpanel Project Token (Project Settings > Overview), identifying which project to check this request against. Sent as the 'token' query parameter. This is distinct from the GDPR Compliance Token used to authenticate this connection.tracking_idstringrequiredThe tracking ID returned by 'mixpanelcompliance_gdpr_retrieval_create' when the retrieval request was created.