Skip to main content
Event subscriptions auto-trigger Definitions from internal business events. A flow author emits an event with the getdialed__utils__emit_event catalog action; every enabled subscription whose event_type exactly matches fires its bound Definition with the event payload as input_data (source: "event"). Matching is exact-name and scoped to your org — no wildcards, no prefixes.

How event subscriptions work

  1. You create a subscription (POST /flows/event-subscriptions) binding an event_type string to a Definition you own.
  2. Somewhere in a flow, a task uses getdialed__utils__emit_event to emit an event with that event_type.
  3. Every enabled subscription with a matching event_type fires its bound Definition, passing the event payload as the new batch’s input_data.
Cycle protection. The causation chain is threaded through every event-triggered batch. If A emits an event that triggers B, which emits one that triggers C, the chain depth is checked before each dispatch — depth > 5 is rejected (CycleDetectedError), cutting off runaway trigger loops at a bounded depth.

Step 1 — Create the subscription

Bind an event name to a Definition you own. The X-API-Key header is admin-equivalent; a Clerk JWT needs the admin role. A missing or cross-tenant definition_id returns 404 (never 403).
Set "enabled": false to register a subscription that stays dormant — it never fires while disabled. There is no update endpoint yet, so a disabled subscription cannot be re-enabled in place: delete it and recreate it with "enabled": true (or just create it enabled once the Definition it points at is ready).

Step 2 — Emit the event from a flow

Subscriptions only fire on deliberately emitted events — system/lifecycle events are not auto-emitted. Add a getdialed__utils__emit_event task to any Definition. The payload you emit becomes the fired Definition’s input_data:
When this task runs, the list.refreshed subscription created above fires def_a1b2c3d4 with {"list_name": "prod", "count": 1200} as its input_data. Emission runs as a durable task inside your worker, so transient delivery failures are covered by the standard retry policy.

Manage subscriptions

List your org’s subscriptions with offset pagination (limit/skip), newest first by default, or delete one when it is no longer needed. The response is the standard Page envelope — items, a real total (the filtered count), the echoed limit/skip, and next_cursor (always null on this offset-paginated list); filter with event_type and order with sort_by/order. Events emitted after deletion no longer fire the bound Definition; already-fired batches are unaffected.

Next steps

Event subscriptions

The full object reference, matching rules, and cycle protection.

Catalog

The getdialed__utils__emit_event action and everything else you can call from a flow.