What you can build
The LUMA API connects your own systems to WhatsApp and to your AI agents. Calls with your API key run from your server (or a server-side tool such as n8n, Make or Power Automate), never from a web page. Your website and mobile app talk to your server, and your server talks to LUMA. The website widget and agent chat are the exception: they are built to run in the browser.
Plan: LUMA Elevate or Enterprise.
Ideas by system
| Your system | What you build | LUMA pieces |
|---|---|---|
| ERP or accounting (Business Central, Odoo, SAP) | Send the invoice PDF or a payment reminder on WhatsApp when an invoice is posted | Media upload, template with a document |
| Online shop | Order confirmed, shipped and delivered messages; abandoned cart reminders | Templates, delivery statuses |
| Bookings (clinic, salon, restaurant, viewings) | Reminders with Confirm and Reschedule buttons; the answer updates your calendar | Quick reply buttons, incoming replies |
| Banking, fintech, apps | One-time codes and account alerts on WhatsApp | Authentication templates |
| CRM or helpdesk | Every WhatsApp conversation, AI lead and handoff lands in your CRM automatically | Webhooks: Incoming message, Lead Capture, Human Handoff, Session End |
| Marketing tools | Keep audiences in sync and launch campaigns from your own tools | Contacts and groups, campaigns |
| Mobile app | Your LUMA agent inside your iOS or Android app | Handshake, chat (normal or streaming) |
| Website | The chat bubble in one line, or your own chat design | Widget, JavaScript SDK |
| Website content, product catalogue | Keep the agent's knowledge current when prices or pages change | Knowledge: crawl, files, text |
| Reporting (Power BI, Excel) | Credit usage, ratings and leads in your management reports | Usage, ratings and leads |
Example 1: invoice on WhatsApp from your ERP
When an invoice is posted, your ERP (or a small service next to it) sends the PDF to the customer.
- Create a utility template once, with a document header and a variable for the invoice number, for example
invoice_readywith the bodyHello {{1}}, your invoice {{2}} is attached.Wait until it isAPPROVED. - When an invoice is posted, upload the PDF and send the template:
# 1. Upload the PDF, keep the returned id
curl --request POST 'https://api.itechintl.com/v1/PHONE_NUMBER_ID/media' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--form 'messaging_product=whatsapp' --form 'type=application/pdf' --form 'file=@INV-1001.pdf'
# 2. Send the template with the document
curl --request POST 'https://api.itechintl.com/v1/messages' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"from": "971500000000",
"to": "971500000001",
"type": "template",
"is_inbox": true,
"template": {
"name": "invoice_ready",
"lang_code": "en_US",
"components": [
{ "type": "header", "parameters": [ { "type": "document", "document": { "id": "MEDIA_ID", "filename": "INV-1001.pdf" } } ] },
{ "type": "body", "parameters": [ { "type": "text", "text": "Customer 1" }, { "type": "text", "text": "INV-1001" } ] }
]
}
}'
- Store the returned
message_idwith the invoice. Your webhook then reportsdeliveredandread, so the ERP can show "seen by the customer".is_inbox: truealso shows the message in the LUMA Inbox, so your team sees it if the customer replies.
Credits: 12 per invoice (one template). Meta's fee for a utility template applies.
Example 2: every lead and handoff into your CRM
- In LUMA, create one webhook for your agent with the events Lead Capture and Human Handoff, a secret, and your HTTPS address (Webhooks).
- On your server, check the
X-Hub-Signature-256signature, then create the record:
// Express, after the signature check shown on the Webhooks page
const event = JSON.parse(req.body.toString("utf8"));
if (event.event === "Lead Capture") {
const fields = Object.fromEntries(event.lead_data.map((f) => [f.field_name, f.field_value]));
await crm.createLead({ name: fields.Name, email: fields.Email, source: "LUMA agent", page: event.page_url });
}
if (event.event === "Human Handoff") {
await crm.createTicket({
subject: `Handoff: ${event.handoff_reason}`,
contact: event.customer_email || event.customer_phone,
description: event.session_summary,
});
}
res.sendStatus(200);
- When your team has handled a handoff, close it in LUMA:
PUT /v1/ai-agent/handoff/{projectId}/{agentId}/{handoffId}with{ "status": "Closed" }.
Credits: free (webhooks and handoff updates use no credits).
Example 3: appointment reminder with buttons
- Create a utility template
appointment_reminderwith two quick reply buttons, "Confirm" and "Reschedule". - The day before, send it with a payload per button, so you know which appointment the answer belongs to:
{
"from": "971500000000",
"to": "971500000001",
"type": "template",
"template": {
"name": "appointment_reminder",
"lang_code": "en_US",
"components": [
{ "type": "body", "parameters": [ { "type": "text", "text": "Customer 1" }, { "type": "text", "text": "26 November, 10:00" } ] },
{ "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "payload", "payload": "CONFIRM_APT_5521" } ] },
{ "type": "button", "sub_type": "quick_reply", "index": 1, "parameters": [ { "type": "payload", "payload": "RESCHEDULE_APT_5521" } ] }
]
}
}
- The tap arrives on your Incoming message webhook as
"type": "button"withbutton.payload(for exampleCONFIRM_APT_5521). Update the calendar and, inside the 24-hour window, reply for free with a text message.
Credits: 12 per reminder; the reply inside the 24-hour window is free.
Example 4: your agent inside your mobile app
- When a user opens the chat screen, your server calls the handshake with the agent's Project ID and Agent ID and gives the app the returned token (valid 1 hour).
- The app sends each message to chat (or the streaming version for word-by-word answers) with that
token, and keeps the
session_idfor the next message. - Pass what you know about the user in
user_metadata(email, name) so the agent can answer personally.
Credits: 60 per answer.
Tools that work without code
n8n, Make, Zapier and Power Automate call APIs from their servers, so every LUMA endpoint works with their HTTP
request step: put Authorization: Bearer lm_live_YOUR_API_KEY in the headers, and point their webhook trigger at a
LUMA webhook for incoming events.
Try calls safely
- Signed in to LUMA: use the API Playground (WhatsApp API, then Technical, then API Playground) to try sends with your own number; your key is filled in for you.
- From your computer: copy any example from these pages into a terminal or Postman with a test key.
- The API Reference shows every endpoint with copy-ready code; it does not send calls from the docs page, so your key is never typed into a web page.