OpenAPI Spec
Download the machine-readable API contract for the ingest service.
The OpenAPI document is the formal machine-readable contract for the ingest service. The built docs site publishes it at /openapi.yaml, copied from the committed source at openapi/clickhouse-product-analytics.openapi.yaml.
Use API reference for the rendered endpoint documentation.
The spec covers:
POST /batch/event ingestion.GET /healthservice health.- JSON batch payloads with optional batch-level and event-level
api_key. - Allowed-origin browser requests and backend/no-origin API-key requests.
- Gzip request bodies via
Content-Encoding: gzip. - Successful ingestion, dropped-event counts, and documented error statuses.
Ingest a batch of events POST
Accepts an application/json object with a non-empty `batch` array. Browser requests from allowed origins can omit `api_key`. Backend or no-origin requests require a valid `api_key` from `PUBLIC_API_KEYS`. Unknown top-level and event-level fields are accepted but ignored unless they are inside `properties`. Events missing `event` or a distinct ID are dropped and counted in the response instead of failing the whole request. A distinct ID may be sent as `distinct_id`, `properties.distinct_id`, or `properties.$distinct_id`. Request compression is supported only with `Content-Encoding: gzip`. Other encodings and the `compression` query parameter are rejected.
SDK Reference
Generated browser SDK API reference.