Configure
Flows
A flow connects a source to a destination, with an optional filter, transformation, delay and ordering.
A flow routes events from one source to one destination. It is also where you decide what each destination receives: which events, in what shape, how soon and in what order.
source ─▶ [ filter ] ─▶ [ transformation ] ─▶ [ delay ] ─▶ destination
A source can have many flows, one per destination. A single request to that source produces one event per active flow whose filter it passes. A source can deliver to a given destination through only one flow.
Create a flow
Open Flows → New flow, or POST /v1/flows (reference):
curl -X POST https://api.getensue.com/v1/flows \
-H "authorization: Bearer ens_<key>" -H "content-type: application/json" \
-d '{
"source_id": "src_…",
"destination_id": "dst_…",
"filter": { "match": "all", "conditions": [{ "path": "type", "op": "eq", "value": "invoice.paid" }] },
"transform_id": "trf_…",
"delay_seconds": 30
}'
| Field | What it does |
|---|---|
filter |
Only requests that match create an event. See Filters. |
transform_id |
Reshapes the body before delivery. See Transformations. |
delay_seconds |
Holds each event for 1 second to 7 days before its first delivery. |
ordering |
Delivers events for the same key one at a time, in order. See Ordering. |
compaction |
Merges updates about the same thing that wait in an inbox. |
region |
Sends deliveries from a chosen region, when your workspace has one available. |
Order of steps
A flow always runs its steps in the same order, so results are predictable:
- The source verifies the request.
- The flow’s filter decides whether an event is created.
- The transformation reshapes the body.
- The delay, if any, holds the event.
- The destination delivers it under its delivery policy.
Changing a flow
Edits to a flow, its filter or its transformation apply from the next attempt, including to events that are already queued. Events keep the destination they were created with: deleting a flow does not cancel events it already created.
Set status to paused to stop a flow from creating events. Requests that arrive meanwhile are still stored, and you can replay them once the flow is active again.