WMS Cloud Messaging API
The Umbrella WhatsApp Business Messaging Suite (WMS) REST API allows developers to integrate official Meta WhatsApp Cloud API messaging into ERP software, CRMs, billing systems, ecommerce backends, and custom web applications.
🔑 Authentication
Authenticate all API requests by supplying your tenant API secret token in the Authorization HTTP header as a Bearer token.
Authorization: Bearer YOUR_TENANT_API_KEY
Content-Type: application/json
Find or regenerate your tenant API key inside your portal under Settings → Developer & API Settings.
📤 1. Send Pre-Approved Template
POST /api.phpRequired for all business-initiated messages and notifications dispatched outside the 24-hour customer service window.
{
"to": "919822001122",
"type": "template",
"template_name": "order_confirmation",
"language": "en_US",
"parameters": ["Rajesh Kumar", "INV-84920", "₹4,250"]
}
curl -X POST https://wmsapi.umbrellatechnologies.in/wmsapi/api.php \
-H "Authorization: Bearer YOUR_TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "919822001122",
"type": "template",
"template_name": "order_confirmation",
"language": "en_US",
"parameters": ["Rajesh Kumar", "INV-84920", "₹4,250"]
}'
{ "success": true, "message_id": "wamid.HBgMOTE5ODIyMDAxMTIyFQIAER..." }
📑 1B. Send Template with Document/PDF Header
POST /api.php (Instant)Used for sending Meta-approved utility or transactional templates that contain a media header (such as a PDF invoice, booking voucher, account statement, or brochure).
- Method 1 (Direct Public URL - Recommended): If your system (e.g. hotel ERP, billing app, or CRM) already stores the PDF on a publicly accessible HTTPS URL, pass it directly in
media_url. Meta Cloud API servers will download it directly. - Method 2 (Upload to WMS First): If you do not have public file hosting, first upload the file to POST /upload.php, which will host it on the server and return a public URL or Meta
media_idto pass here.
{
"to": "919882214469",
"type": "template",
"template_name": "stay_invoice",
"language": "en_US",
"parameters": [
"Rajesh Kumar",
"INV-1024",
"05 Nov 2026, 11:00 AM",
"₹4,500.00"
],
"media_url": "https://pandharipuram.com/invoices/INV_1024.pdf",
"media_type": "document",
"filename": "Pandhari_Palace_Invoice_INV1024.pdf",
"instant": true
}
curl -X POST https://wmsapi.umbrellatechnologies.in/wmsapi/api.php \
-H "Authorization: Bearer YOUR_TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "919882214469",
"type": "template",
"template_name": "stay_invoice",
"language": "en_US",
"parameters": ["Rajesh Kumar", "INV-1024", "05 Nov 2026, 11:00 AM", "₹4,500.00"],
"media_url": "https://pandharipuram.com/invoices/INV_1024.pdf",
"media_type": "document",
"filename": "Pandhari_Palace_Invoice_INV1024.pdf",
"instant": true
}'
| Field | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Recipient mobile number with country code (e.g. 919882214469). |
| type | string | Yes | Must be "template". |
| template_name | string | Yes | The exact name of the Meta pre-approved template with document header. |
| language | string | Optional | Template language locale (defaults to "en_US"). |
| parameters | array | Optional | Array of strings for body variables: {{1}}, {{2}}, etc. |
| media_url | string | Yes | Public HTTPS URL to the document, or a Meta media_id uploaded via /upload.php. |
| media_type | string | Yes | Must be "document", "pdf", "image", or "video". |
| filename | string | Optional | Friendly filename displayed on the user's phone (e.g. "Invoice_INV1024.pdf"). Defaults to "Document.pdf". |
| instant | boolean | Optional | Set to true for immediate, synchronous real-time dispatch (automatic when media_url is present). |
{
"success": true,
"message_id": "wamid.HBgMOTE5ODgyMjE0NDY5FQIAER..."
}
💬 2. Send 24-Hour Direct Text
POST /api.phpUse freeform text to respond to customer inquiries within the 24-hour service conversation window opened by a customer's incoming message.
{
"to": "919822001122",
"type": "text",
"body": "Hello Rajesh, our support team has updated your ticket #402. Let us know if you need anything else!"
}
📎 3. Send PDF Invoices & Media
POST /api.phpSend invoice PDFs, product brochures, or image attachments by providing a publicly reachable media URL.
{
"to": "919822001122",
"type": "document",
"media_url": "https://your-crm-server.com/invoices/INV_84920.pdf",
"filename": "Invoice_84920.pdf"
}
📤 4. Upload Document/Media to WMS Server
POST /upload.php
If your application cannot host documents publicly, upload the file directly to WMS. WMS saves the file to the secure public uploads directory (https://wms.umbrellatechnologies.in/wms/uploads/), registers it with Meta Cloud API, and returns both the public URL and Meta media_id.
curl -X POST https://wmsapi.umbrellatechnologies.in/wmsapi/upload.php \ -H "Authorization: Bearer YOUR_TENANT_API_KEY" \ -F "file=@/local/path/to/invoice.pdf" \ -F "type=document"
{
"success": true,
"url": "https://wms.umbrellatechnologies.in/wms/uploads/8a1b2c3d_1730812345.pdf",
"media_id": "847291038491823",
"filename": "invoice.pdf",
"type": "document"
}
💡 You can pass the returned url or media_id into the media_url field of POST /api.php.
📡 5. Real-Time Outbound Webhooks
Configure your listener endpoint inside WMS Portal → Settings → Developer & API Settings. WMS will dispatch an HTTP POST callback whenever an incoming customer message arrives or when delivery statuses change (`sent`, `delivered`, `read`, `failed`).
{
"event": "message_received",
"from": "919822001122",
"name": "Rajesh Kumar",
"message_id": "wamid.HBgMOTE5ODIyMDAxMTIyFQIAER...",
"type": "text",
"body": "Can you share the quote for 50 units?",
"timestamp": "2026-08-25T13:10:00Z"
}
Status & Error Codes
| HTTP Code | Meaning | Resolution |
|---|---|---|
| 200 OK | Success | Message was submitted or queued to Meta Cloud API. |
| 400 Bad Request | Invalid Payload | Missing required fields (`to`, `type`, `template_name`, or `body`). |
| 401 Unauthorized | Invalid API Key | Verify `Authorization: Bearer |
| 403 Forbidden | Plan Restriction | Upgrade to Enterprise plan to unlock API & Webhooks. |
| 429 Rate Limit | Quota Exceeded | Daily broadcast threshold reached for current subscription tier. |