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

Quick start: your first API call

Create a key, check it works and send your first WhatsApp message. About five minutes.

5 min read Admin

Before you start

  • You are the owner or an admin of the workspace (only they can create API keys).
  • A WhatsApp number is connected in Flowleb.
  • A terminal (for cURL) or any tool that can send HTTP requests, such as Postman.
  • Your own phone number to test with.

Step 1 · Create your API key

  1. Open the REST API page

    In your Flowleb dashboard, open the menu and find the Developer group.

    Developer REST API

  2. Name and create the key

    Type a name you will recognise, like "Production backend", and click Create key.

  3. Copy the key right away

    The full key is shown only once. Flowleb keeps just a scrambled copy (a hash), so nobody can show it to you again. Save it somewhere safe, such as your server's environment settings.

Create your key

1Key nameProduction backend 2Create key
3 Copy it now. It won't be shown again. wsk_8fK2pQ…x7LmCopy
  1. Give the key a name you'll recognise.
  2. Click “Create key”.
  3. Copy the key and store it on your server. It's shown only once.

Simplified drawing of the dashboard page.

Step 2 · Check the key works

Ask the API who you are. Replace YOUR_API_KEY with your key. In the Node.js, Python and PHP samples the key is read from an environment variable called FLOWLEB_API_KEY.

GET /api/v1/me

Returns your workspace, plan and limits. Changes nothing, so it's safe to try.

curl https://flowleb.com/api/v1/me \
  -H "Authorization: Bearer YOUR_API_KEY"
Response 200 OK
{
  "data": {
    "account": {
      "name": "Maya Shah",
      "email": "maya@example.com"
    },
    "workspace": {
      "id": 12,
      "name": "Maya's Store",
      "slug": "mayas-store",
      "timezone": "Asia/Kolkata",
      "currency": "INR"
    },
    "plan": { "id": 3, "name": "Pro", "is_free": false },
    "limits": { … },
    "features": { … }
  }
}

Step 3 · Send a message

Every request has the same four parts:

1POST
https://flowleb.com/api/v1/messages
2Authorization: Bearer wsk_your_key
3Content-Type: application/json
4{
  "to": "919876543210",
  "type": "text",
  "text": "Order shipped!"
}
  1. Method + address What to do (POST = create or send) and where.
  2. Your API key Proves the call comes from your workspace.
  3. Format Tells Flowleb the body is JSON.
  4. Body The details: who gets it and what it says.
POST /api/v1/messages

Sends one message. Put your own number in to: country code + number, digits only.

curl -X POST https://flowleb.com/api/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "919876543210",
    "type": "text",
    "text": "Hi Maya, your order #2045 has shipped!"
  }'
Response 201 Created
{
  "data": {
    "id": 48213,
    "to": "919876543210",
    "type": "text",
    "status": "sent",
    "failure_reason": null,
    "error_code": null,
    "body": "Hi Maya, your order #2045 has shipped!",
    "media_url": null,
    "created_at": "2026-11-18T10:24:05+05:30"
  }
}

Check your phone: the message should be there. Keep the id from the response; you need it in the next step.

Step 4 · Check delivery

GET /api/v1/messages/{id}

Shows the latest status of one message.

cURL
curl https://flowleb.com/api/v1/messages/48213 \
  -H "Authorization: Bearer YOUR_API_KEY"
Response 200 OK
{
  "data": {
    "id": 48213,
    "to": "919876543210",
    "type": "text",
    "status": "delivered",
    "failure_reason": null,
    "error_code": null,
    "body": "Hi Maya, your order #2045 has shipped!",
    "media_url": null,
    "created_at": "2026-11-18T10:24:05+05:30"
  }
}
sent Left Flowleb
delivered On their phone
read They opened it
failed See failure_reason

You're set up. What next?

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