Skip to main content
POST
Ingest trace events

Authorizations

x-api-key
string
header
required

Project API key. Manage keys in the Zespan dashboard under project settings.

Body

application/x-ndjson

Newline-delimited JSON. Each line is a single event object.

Example:

"{\"trace_id\":\"3b1c...\",\"span_id\":\"a91f...\",\"name\":\"chat.completions\",\"provider\":\"openai\",\"model\":\"gpt-4o\",\"operation\":\"chat.completions\",\"input_tokens\":812,\"output_tokens\":146,\"latency_ms\":1240,\"status\":\"success\",\"timestamp\":\"2026-07-05T12:00:00.000Z\"}\n{\"trace_id\":\"3b1c...\",\"span_id\":\"c72d...\",\"parent_span_id\":\"a91f...\",\"name\":\"vector.search\",\"operation\":\"retrieval.query\",\"latency_ms\":54,\"status\":\"success\",\"timestamp\":\"2026-07-05T12:00:00.050Z\"}\n"

Response

Batch accepted for asynchronous processing.

accepted
integer
required

Number of events accepted from the batch.

Example:

2

cv
integer
required

Current project config version (used by SDKs for config propagation).

Example:

7