Skip to main content

Sending SMS, WhatsApp & Email

The Messaging API sends SMS (via your DLT-registered gateway), WhatsApp (via your Meta Cloud API provider) and email (via your configured email provider) for a single company. All three are live.

  • Base: https://api.laabam.one/v1
  • Auth: X-Client-Id + X-Client-Secret headers (details).
  • Scopes: messages:sms:send, messages:whatsapp:send, messages:email:send, messages:read.
  • Limits: a dedicated messaging rate limit (default 30/min) and a daily cap per key, on top of your key's general rate limit.
  • {company} in the path is your company slug.
Compliance
  • SMS (India DLT): pass an approved sender_id and your registered template_id (and pe_id); the message text must match the approved template.
  • WhatsApp: business-initiated messages must use a Meta-approved template. Free text is only delivered inside an open 24-hour customer-service window, and recipients must have opted in.

Send an SMS

curl -X POST https://api.laabam.one/v1/messaging/{company}/sms \
-H "X-Client-Id: lk_id_..." \
-H "X-Client-Secret: lk_secret_..." \
-H "Content-Type: application/json" \
-d '{
"to": "919800000000",
"message": "Your OTP is 123456",
"sender_id": "LBMONE",
"template_id": "1707xxxxxxxxxxxxx",
"pe_id": "1101xxxxxxxxxxxxx",
"type": "transactional"
}'

202 Accepted

{ "data": { "id": "msg_abc123", "channel": "sms", "status": "sent", "to": "919800000000", "created_at": "2026-06-14T09:30:00Z" } }

message is required; sender_id / template_id / pe_id are required for India DLT.

Send a WhatsApp message

Template (business-initiated):

curl -X POST https://api.laabam.one/v1/messaging/{company}/whatsapp \
-H "X-Client-Id: lk_id_..." \
-H "X-Client-Secret: lk_secret_..." \
-H "Content-Type: application/json" \
-d '{
"to": "919800000000",
"type": "template",
"template": { "name": "invoice_due", "language": "en", "variables": ["Acme", "3540.00"] }
}'

Free text (only within the 24-hour service window):

curl -X POST https://api.laabam.one/v1/messaging/{company}/whatsapp \
-H "X-Client-Id: lk_id_..." -H "X-Client-Secret: lk_secret_..." \
-H "Content-Type: application/json" \
-d '{ "to": "919800000000", "type": "text", "text": { "body": "Thanks for your order!" } }'

202 Accepted

{ "data": { "id": "wamid.HBgM...", "channel": "whatsapp", "status": "sent", "to": "919800000000", "created_at": "2026-06-14T09:30:00Z" } }

Send an email

Sends a transactional email through your company's configured email provider (Settings → Marketing → Email provider). The sender identity comes from that provider — you cannot set an arbitrary from. HTML is sanitised server-side. Send to one recipient or up to 50.

curl -X POST https://api.laabam.one/v1/messaging/{company}/email \
-H "X-Client-Id: lk_id_..." \
-H "X-Client-Secret: lk_secret_..." \
-H "Content-Type: application/json" \
-d '{
"to": [{ "email": "jane@acme.com", "name": "Jane" }],
"subject": "Your invoice is ready",
"html": "<p>Hi Jane, your invoice <b>INV-1042</b> is attached.</p>"
}'

to also accepts a plain string ("jane@acme.com") or an array of strings.

202 Accepted

{ "data": { "id": "email_9f1c...", "channel": "email", "status": "sent", "to": ["jane@acme.com"], "sent_count": 1, "failed": [], "created_at": "2026-06-14T09:30:00Z" } }
note

Email delivery/open tracking is not exposed through the status endpoint yet — status reflects acceptance for sending, not final delivery.

Delivery reports

Poll the status endpoint with the id returned by a send call:

curl https://api.laabam.one/v1/messaging/{company}/messages/{id} \
-H "X-Client-Id: lk_id_..." -H "X-Client-Secret: lk_secret_..."
{
"data": {
"id": "msg_abc123",
"channel": "sms",
"status": "delivered",
"to": "919800000000",
"delivered_at": "2026-06-14T09:31:05Z",
"failed_at": null,
"error": null
}
}

Status lifecycle:

  • SMS: queued → submitted → delivered (or failed / rejected). Updated automatically from the carrier delivery receipt (DLR) — no setup needed.
  • WhatsApp: sent → delivered → read (or failed). Updated from Meta status callbacks (delivered_at, read_at, and error on failure).

WhatsApp delivery reports require a one-time webhook setup in your Meta app (WhatsApp → Configuration → Webhooks): set the Callback URL to https://api.laabam.one/v1/webhooks/whatsapp, enter your Verify Token, and subscribe to the messages field. SMS works out of the box.

Errors

StatusMeaning
401Missing/invalid API credentials
403Key lacks messages:sms:send / messages:whatsapp:send
422Validation failed, or no active provider configured for the channel
429Messaging rate limit or daily cap reached (Retry-After)

See the full schema in the API Reference.