API contract

POST /events — companion to the spec

Source of truth: openapi/events.yaml · Base path: as declared in that file, not a hostname · Audience: producer teams

Auth

Service-to-service mTLS at the gateway, plus an audience claim on the caller identity. No API keys in query strings. This document does not include credentials.

Resource map

Operations producers call
MethodPathSuccessNotes
POST/events202Accepted for ingest. Body is the event.
GET/events/{id}200 / 404Lookup by event ID. Not a list.

Conventions

Worked examples

Success (synthetic):

httpPOST /events
{"id":"evt_01","type":"checkout.paid"}

202
{"id":"evt_01","status":"accepted"}

Error — queue shed (after RFC 014; today this is a 503):

http202
{"id":"evt_01","status":"shed","code":"INGEST_SHED","retryable":true}

Error catalog

Stable codes
CodeMeaningClient should
INGEST_SHEDChosen queue unavailableRetry with backoff
INVALID_EVENTBody failed schemaFix the payload; do not retry

Spec ↔ implementation

OpenAPI still documents 503 on overload. Implementation after RFC 014 will return 202 + INGEST_SHED. Until the spec PR lands, treat the YAML as source and this paragraph as the known drift.

Changelog

2026-08-12 — documented shed. No breaking change yet.