Skip to main content
The Event Ingestion API accepts typed customer events, publishes them to the internal event stream, and evaluates them against active trigger rules in real time. When a trigger matches, its configured action is dispatched automatically.
This endpoint is separate from the batch Events API. Use this for real-time, single-event ingestion from mobile apps, websites, and backend services.

Base Path


POST /api/v1/events/ingest

Ingest a single customer event for real-time processing. Roles: Any authenticated user (no role check — only requires valid tenant).

Request Body

Event Types

Each event type is mapped to one or more internal trigger event types. This means a single purchase event can fire both purchase-specific triggers and broader outcome.recorded triggers.

Response 200

Response Fields

Example


Processing Pipeline

When an event is ingested, the following happens in order:
  1. Validation — The request body is validated against the Zod schema. Invalid events return a 400.
  2. Event stream publish — The event is published to the internal event bus. If the stream is unavailable, processing continues (non-critical).
  3. Trigger evaluation — Active trigger rules are loaded and evaluated against the event. Each matching trigger’s action is dispatched.
  4. Response — The API returns the ingestion result with matched triggers and dispatched actions.
Event stream publish failures are non-critical and will not cause the API to return an error. The event is still evaluated against triggers. Check the streamId field — a null value indicates the stream publish failed.

Cross-Channel Triggers

Event ingestion powers cross-channel workflows. For example:

Error Codes


See Also