Report business outcomes attributed to traces
Report a batch of business outcomes (a deflected ticket, an avoided refund, an SLA met) attributed to traces your SDK already emitted. This is a direct, synchronous write to ClickHouse — not routed through the same async queue as POST /v1/ingest — since it’s a single low-volume out-of-band call rather than a batched stream of trace events.
The trace an outcome names does not need to exist in Zespan yet. Outcomes and traces are joined at query time (GET /v1/projects/{id}/outcomes/summary), not at write time, so an outcome that arrives before its trace has finished ingesting is stored and joined correctly once the trace shows up. This is the expected shape, not an edge case: an outcome is usually known minutes or hours after the trace that produced it has already finished, from a customer’s own backend (a support-desk webhook, a billing reconciliation job) — not from the same process that ran the agent.
Re-reporting the same (kind, traceId) pair is how you correct an earlier outcome — for example, a ticket that reopens after you’d already reported ticket_deflected: true. It is not an update to the earlier row; it’s a new one, and the most recently ingested value is what reads (including the summary endpoint below) return.
Authenticated with x-api-key, the same as the rest of ingestion — this route is never reachable with a dashboard session.
Authorizations
Project API key. Manage keys in the Zespan dashboard under project settings.
Body
Up to 100 outcomes per request — the same per-batch cap POST /v1/ingest uses for native SDK events, reused rather than inventing a second limit for a second ingest endpoint.
1 - 100 elementsResponse
Batch accepted and written.
Number of outcomes accepted from the batch.
1

