Skip to main content
A flow is an automation: a trigger (an order is paid, a tag is added, an event from your system…) followed by steps (wait, check, split, send a WhatsApp message or an email, tag, make a discount code…). Everything you can build in Automation → Flows you can read and write here. All endpoints live on https://api.flowiq.live and take an organisation API key (Settings → API Keys) as Authorization: Bearer fiq_…. Reads need the read scope, changes need write.
A flow you create is always switched off. Switching it on is its own call, so a script can never start messaging customers by accident.

Endpoints

The flow object

repeat is one of off (every time it triggers), once_per_contact, once_per_order, once_per_order_per_day, once_per_subscription, reenter_after (then definition.reenter_after_days).

Changing a flow safely

  1. GET /v1/flows/{id} and keep its etag.
  2. Change the definition you got back.
  3. PATCH /v1/flows/{id} with If-Match: <etag>.
If someone changed the flow in the app since you read it, you get 412 precondition_failed with the new etag, and nothing is overwritten. Every change is kept as a version in the app (Versions).

Example: an abandoned checkout that re-sends to people who did not open

Then switch it on:
A flow cannot go live while a WhatsApp message in it has no approved template: you get 409 not_ready with the steps to fix in problems.

Building blocks

Triggers (definition.trigger): Shopify orders/paid, orders/fulfilled, orders/create, checkouts/create; WooCommerce wc/order.paid and friends; contact.tag_added (with tag), contact.created, message.first, message.keyword; date.attribute, date.after_last_order, date.before_renewal, date.unengaged; store.browse_abandoned, store.active; product.price_drop, product.low_stock; api.event (with event_name, started by Send an event). Steps (definition.steps): delay (value, unit, optional until_time and weekdays), condition (checks that must pass), split (paths with their own steps; random paths make an A/B test), action with send_message (a WhatsApp template), email (plain text, or content: "design" with an email designed in Broadcast → Email), update_contact (tags and fields), discount_code, alert, webhook, agent_brief. Checks (in condition steps, split paths and exit_rules): what they ordered, a detail of the order, their subscription, the items or collection in the order, message_engagement (did they open or click a message of this flow), engagement (engaged lately), store_activity (on the store lately), replied, and more. The easiest way to see the exact shape of anything: build it in Automation → Flows, then GET /v1/flows/{id}.

Errors