Requests, responses and errors
The rules every endpoint follows: format, phone numbers, responses, error codes, limits and pages.
The basics
- Base URL
https://flowleb.com/api/v1. Always HTTPS.- Format
- Send JSON with
Content-Type: application/json. To upload a file, sendmultipart/form-datainstead. - Phone numbers
- Country code + number, digits only:
919876543210(India),14155550123(US). No spaces, dashes or leading zeros. - Dates and times
- Like
2026-11-20 10:00or ISO 8601 (2026-11-20T10:00:00+05:30). Addtimezone(for exampleAsia/Kolkata) where an endpoint accepts it. - Ids
- Numbers, except WhatsApp Business API numbers in
/devices, which look likecfg_20.
Successful responses
Everything that worked comes back inside data. Lists add meta with counts or page numbers.
{
"data": [ { "id": 9120, "name": "Maya Shah", … } ],
"meta": { "page": 1, "per_page": 25, "total": 140, "last_page": 6 }
}
Errors
Errors come back inside error, with a code your program can check and a message a person can read.
{
"error": {
"code": "template_not_found",
"message": "Template not found in this workspace."
}
}
When a field is missing or has the wrong format, you get 422 with the problem fields listed under errors:
{
"message": "The to field is required.",
"errors": {
"to": ["The to field is required."]
}
}
Status codes
| Code | Means | What to do |
|---|---|---|
| 200 / 201 | Worked (201 = something was created or sent) | Read data |
| 401 | No key, or a wrong or revoked key | Check the Authorization header |
| 404 | That id doesn't exist in this workspace | Check the id, and that you're using the right workspace's key |
| 422 | The request was understood but can't be done | Read error.message or errors and fix the request |
| 429 | Too many requests this minute | Wait for the seconds in Retry-After, then retry |
| 500+ | Something went wrong on our side | Retry a little later; if it keeps happening, tell us |
Error codes
| code | When |
|---|---|
| missing_api_key · invalid_api_key | Key problems (see API keys) |
| not_found | The thing with that id isn't in your workspace |
| send_failed | The channel refused the message. The message says why (e.g. outside the 24-hour window, number not on WhatsApp) |
| media_required | You set an image, video, document or audio type but sent no file or media_url |
| unsupported_media_type | The template header file type isn't accepted |
| template_not_found · invalid_template | The template id isn't in this workspace |
| invalid_group · no_recipients | A broadcast has no valid group or contacts |
| flow_inactive | The flow is a draft or paused |
| contact_not_found | No contact matches that id or phone |
| not_stoppable · not_cancellable | The broadcast or schedule has already finished |
| rate_limited | Too many requests this minute |
Rate limits
Each key can make a set number of requests per minute, depending on your plan. Every response tells you where you stand:
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 597
Over the limit you get 429 with a Retry-After header (seconds). Wait that long and try again. Sending messages also uses your plan's monthly message allowance; check it with GET /usage.
Lists and pages
| Endpoint | How to page |
|---|---|
| GET /contacts | page, per_page (up to 100), search |
| GET /conversations | page, per_page (up to 100) |
| GET /messages · GET /broadcasts | limit (up to 200), newest first |
| GET /broadcasts/{id}/recipients | limit (up to 500) |