is it possible to have some event from mixpanel (export api) with null insert_id ??
Yes, it is possible to encounter events with a null/missing $insert_id in the raw export API output. Here's why: When an event is sent to the Mixpanel Ingestion API without an $insert_id, Mixpanel will auto-generate one for it internally. However, this auto-generated ID is used only for storage purposes — the event will not qualify for the deduplication process. [Event Deduplication] Additionally, it's important to note that deduplication is not applied to raw data exports. The Raw Event Export API returns events as they are stored, meaning you may see duplicates in the exported data. [Raw Data Export API] Regarding the /import endpoint specifically, $insert_id is a required field — events submitted without it will fail validation (when using strict=1). [Import Events]
Recommendations
Always generate a unique $insert_id (e.g., a UUID) for each event at ingestion time.
When processing exported data, apply your own deduplication logic based on the combination of (event name, distinct_id, timestamp, $insert_id) to handle any duplicates. [Raw Data Export API]
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
