Put distinct_id inside each event object; per-event timestamp lets you preserve original event times.
For importing historical data, add top-level "historical_migration": true so the import bypasses spike detection and is not flagged as anomalous traffic.
Docs: https://posthog.com/docs/api/capture
Known gotchas
The entire request body must be less than 20MB by default — chunk large imports.
Individual events in the batch with a missing event name or missing/empty distinct_id are dropped silently while the request still returns 200.
Omitting historical_migration on large backfills can trigger spike detection.
The project API key (phc_...) is public/write-only; never send a personal API key (phx_...) to capture endpoints.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?