Skip to main content

Warehouse Connectors API

Import events, users, groups, and lookup tables from external data warehouses into Mixpanel.

Base URL

https://mixpanel.com/api/app/projects/{projectId}/warehouse-sources/imports

Supported Warehouses

  • BigQuery
  • Snowflake
  • Amazon Redshift
  • Databricks
  • PostgreSQL

List Warehouse Imports

Get all warehouse imports for a project.
projectId
number
required
Your Mixpanel project ID

Example Request

curl "https://mixpanel.com/api/app/projects/123/warehouse-sources/imports" \
  -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET

Get Warehouse Import

Get details of a specific import.
projectId
number
required
Your Mixpanel project ID
importId
string
required
The import ID

Example Request

curl "https://mixpanel.com/api/app/projects/123/warehouse-sources/imports/abc123" \
  -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET

Update Warehouse Import

Pause/resume an import or update its configuration.
projectId
number
required
Your Mixpanel project ID
importId
string
required
The import ID
paused
boolean
required
Pause or resume the import
run_every
integer
Sync frequency in nanoseconds:
  • 0: API-triggered only
  • 3600000000000: Hourly
  • 86400000000000: Daily
  • 604800000000000: Weekly

Example Request

curl "https://mixpanel.com/api/app/projects/123/warehouse-sources/imports/abc123" \
  -X PATCH \
  -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
  -H "Content-Type: application/json" \
  -d '{
    "paused": false,
    "run_every": 86400000000000
  }'

Delete Warehouse Import

Delete an import and optionally its imported data.
projectId
number
required
Your Mixpanel project ID
importId
string
required
The import ID
delete_data
boolean
Also delete the imported data from MixpanelDefault: false

Example Request

curl "https://mixpanel.com/api/app/projects/123/warehouse-sources/imports/abc123" \
  -X DELETE \
  -u SERVICE_ACCOUNT_USERNAME:SERVICE_ACCOUNT_SECRET \
  -H "Content-Type: application/json" \
  -d '{"delete_data": true}'
Deleting an import with delete_data: true will permanently remove all imported data from Mixpanel.

Best Practices

Test your import configuration with manual syncs before enabling scheduled runs.
Regularly check import status and logs to catch issues early:
def check_import_health(project_id, import_id):
    response = requests.get(
        f'https://mixpanel.com/api/app/projects/{project_id}/warehouse-sources/imports/{import_id}',
        auth=HTTPBasicAuth('USERNAME', 'SECRET')
    )
    
    data = response.json()
    if data['results']['status'] != 'active':
        alert_team(f"Import {import_id} is {data['results']['status']}")
Balance freshness needs with costs:
  • Hourly: For real-time critical data
  • Daily: For most analytics use cases
  • Weekly: For reference/dimension data

Build docs developers (and LLMs) love