v1

latestOpenAPI 3.0.3MIT2026-07-26104113247.1 KB
Warehouse Imports

Create an event stream import

Create a new warehouse import for event data.

Event stream imports sync event data from your warehouse table to Mixpanel. Each row in your table becomes an event in Mixpanel.

Sync Modes

  • time_based: Incrementally syncs new rows based on an insert time column
  • mirror_mode: Detects changes in the source table and mirrors them to Mixpanel
  • full_sync: Re-syncs all data on each run
  • one_time: Syncs data once and does not repeat

Required Column Mappings

You must specify either:

  • event_name: A static event name for all rows
  • event_column_name: The column containing the event name

For B2B projects, company_column_name is also required.

Scheduling

  • run_every (integer): Sync frequency in nanoseconds. Allowed values:
    • Trigger via API: 0
    • Hourly: 3600000000000 (60 * 60 * 10^9)
    • Daily: 86400000000000 (24 * 60 * 60 * 10^9)
    • Weekly: 604800000000000 (7 * 24 * 60 * 60 * 10^9)
  • databricks_params (object): Databricks-specific cluster configuration (only for Databricks sources)
post/projects/{projectId}/warehouse-sources/imports/event-stream

Path parameters

projectIdinteger required

Your project id (eg: 12345)

Request body

import_type'event_stream' required
warehouse_source_idinteger required
table_paramsTableParams required

Table location parameters (structure depends on warehouse type)

event_namestring
event_column_namestring
time_column_namestring required
user_column_namestring
company_column_namestring

Required for B2B projects. The column containing the company identifier.

device_column_namestring nullable
json_properties_column_namestring nullable
sync_mode'time_based' | 'mirror_mode' | 'full_sync' | 'one_time' required
run_every0 | 3600000000000 | 86400000000000 | 604800000000000

Sync frequency in nanoseconds. Only these values are accepted:

  • 0 - API-triggered only (use the manual-sync endpoint to trigger)
  • 3600000000000 - Hourly
  • 86400000000000 - Daily
  • 604800000000000 - Weekly
insert_time_column_namestring nullable
property_mappingsPropertyMappings nullable

Response

Success

status'ok'

"ok" if the request succeeded, "error" otherwise.

Example response

{
  "status": "ok"
}