Capture V1 protocol now available; Bearer auth and per-event results
posthog-v7.22.0
Minor changes
-
d459b57 Add an opt-in
capture_modefor the Capture V1 ingestion protocol (POST /i/v1/analytics/events). Setcapture_mode="v1"on the client (or thePOSTHOG_CAPTURE_MODE=v1environment variable) to use Bearer auth, per-event results, and partial retry. Defaults to"v0"(the legacy/batch/endpoint), so existing setups are unaffected.When using
capture_mode="v1", request bodies can be compressed viacapture_compression(orPOSTHOG_CAPTURE_COMPRESSION):"gzip","deflate","zstd"(requires the optionalposthog[zstd]extra), or"none"(default). The legacygzip=Trueflag is honored as a fallback.Per-event server verdicts are surfaced through the existing
on_errorhandler: events the backend explicitly drops, or fails to accept after retries, raise aCaptureV1Errorcarrying the affected event UUIDs — so a rejection is never silently lost, even when the HTTP request itself succeeded. — Thanks @eli-r-ph for your first contribution 🎉!
Fetched July 6, 2026
