LiteFlow API.
One endpoint to send an approved WhatsApp template message from your own systems — WooCommerce, a CRM, a cron job, anything that can make an HTTPS request. Same send path, same zero-markup billing, and same India-only guard as sending from the LiteFlow dashboard itself.
Overview
The LiteFlow API is a single authenticated endpoint for sending pre-approved WhatsApp template messages. It's the same underlying send path Send Message uses in the dashboard — same reserve → Meta call → settle lifecycle, same zero-markup billing — just callable from your own code instead of a browser session.
Requires an approved template already created in your LiteFlow dashboard. This endpoint sends messages; it does not create templates or manage your WhatsApp connection.
POST https://litewoolabs.com/api/v1/messages.php — HTTPS only, JSON in and out.
Authentication
Generate a key from your dashboard under API Keys. The plaintext key is shown once at creation — store it like a password. Send it as a Bearer token on every request; there's no session or CSRF token involved, the key itself is the credential.
curl -X POST https://litewoolabs.com/api/v1/messages.php \
-H "Authorization: Bearer lfk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "+91XXXXXXXXXX",
"template_name": "order_confirmation",
"language": "en_US",
"client_reference": "order-4512-confirmation",
"body_variables": ["Waseem", "#4512"],
"header_variable": null
}'
Request Fields
| Field | Required | Notes |
|---|---|---|
| to | Yes | E.164 format, must start with +. India numbers only at launch. |
| template_name | Yes | Must match an approved template in your account exactly. |
| language | Yes | e.g. en_US — matches the template's approved language. |
| client_reference | Yes | Your own unique ID for this send (e.g. an order ID). Required for API calls — see idempotency below. |
| body_variables | No | Array of strings filling the template's {{1}}, {{2}}, etc. |
| header_variable | No | Text-header templates only. Templates with a media header aren't supported via API yet. |
Idempotency
client_reference is required precisely because API callers are the ones most likely to retry on a timeout. Submit the same client_reference twice — on purpose or by accident — and LiteFlow never sends the message twice. The second call returns the original request's outcome with "idempotent": true instead of erroring or re-sending.
{
"message_uid": "msg_9f2a...",
"status": "accepted",
"wamid": "wamid.HBgL...",
"billed_amount": null,
"billing_unit": "utility"
}
Response Codes
| Status | Meaning |
|---|---|
| 200 | Accepted (or idempotent replay of a prior request). |
| 400 | Missing/invalid field, unknown template, or an opted-out contact. |
| 401 | Missing, invalid, or revoked API key. |
| 403 | Subscription inactive. |
| 429 | Rate limit exceeded for your organization. |
| 502 | Meta rejected the send (see detail in the response body). |
COD Shield Pro API (planned)
COD Shield Pro is currently in early access as a WooCommerce plugin, not a live callable API yet. Verification requests will use HMAC SHA256 signatures on your merchant secret once this ships.
$payload = json_encode(['api_key' => 'YOUR_KEY', 'amount' => 3.00]);
$signature = hash_hmac('sha256', $payload, 'YOUR_API_SECRET');
$headers = ['X-LiteWoo-Signature: ' . $signature];