Skip to content
New Describe an automation in plain words, and AI builds it for you.
Developers

Start an automation from your app

Put a person into a Flowleb flow the moment something happens in your system.

4 min read Developers

Build the conversation once in the Flowleb flow builder (welcome message, questions, follow-ups, delays). Then let your website or app start it for each new person with one API call.

Form filled On your website
Your server POST /flows/18/enroll
Flow starts Messages go out by themselves
Hand-off To your team when needed

Before you start

  • A flow built and published in Flowleb (see Flows).

Step 1 · Find the flow's id

GET /api/v1/flows

Lists your flows with their status.

cURL
curl https://flowleb.com/api/v1/flows -H "Authorization: Bearer YOUR_API_KEY"
Response 200 OK
{
  "data": [
    { "id": 18, "name": "New lead follow-up", "trigger": "keyword",
      "status": "live", "subscribers_count": 240, … }
  ],
  "meta": { "count": 1 }
}

Only flows with status live can take new people. draft and paused flows return flow_inactive.

Step 2 · Start it for a person

POST /api/v1/flows/{id}/enroll

Send phone or contact_id.

cURL
curl -X POST https://flowleb.com/api/v1/flows/18/enroll \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "919876543210" }'
Response 201 Created
{
  "data": {
    "flow_id": 18,
    "contact_id": 9120,
    "subscriber_id": 30411,
    "status": "active",
    "enrolled_at": "2026-11-18T10:40:12+05:30"
  }
}

Full example: website form

Node.js · Express
// Your website's form handler (Express). Runs on YOUR server, never in the browser.
app.post('/lead', async (req, res) => {
  const { name, phone } = req.body;
  const api = (path, body) => fetch(`https://flowleb.com/api/v1${path}`, {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.FLOWLEB_API_KEY}`, 'Content-Type': 'application/json' },
    body: JSON.stringify(body),
  });

  // 1. make sure the person is a contact
  await api('/contacts', { name, phone });
  // 2. start the follow-up flow for them
  await api('/flows/18/enroll', { phone });

  res.redirect('/thank-you');
});

See who is in the flow

GET /api/v1/flows/{id}/subscribers

Each person in the flow and where they are, with totals in meta.counts.

Still stuck? Ask the team, a person replies by email.