API reference 3 min read
Connect from your own platform
Build a branded chat and billing interface using supported server-side APIs.
On this page
Supported integration boundary
You can build your own branded frontend around the supported APIs. This is not a promise of a rebrandable hosted console, iframe login, reseller account provisioning or removal of Meta/provider checkout identity. Account setup and business verification still use the supported MeshDex and Meta flows. Confirm any reseller, custom-domain or commercial white-label requirements with support.
Keep credentials on your backend
Use: your authenticated frontend → your backend → MeshDex Connect API. Store a separate authorized key for each workspace on your backend. Resolve the workspace from your own trusted user membership; never accept a browser-supplied workspace ID as authority. API keys can access workspace-wide messages, so enforce user/conversation permissions before returning any data. Do not put API keys, dashboard tokens or Meta credentials in browser/mobile code.
Choose the supported surface
Messaging supports text, approved templates, bulk text, history and read receipts. Signed webhooks carry inbound and delivery events. Billing scopes enable catalog/profile, balances, usage, invoices, checkout and subscription workflows. Do not assume dashboard-only contacts, assignment, labels, campaign governance or key management are general API-key endpoints. Public media upload/download and API-key browser websockets are not provided.
Implement chat end to end
Authenticate your user, resolve their authorized workspace and sender, fetch history with recipient and sender, and follow opaque cursors until hasNext is false. Render your own thread grouped by sender and recipient. Send text with a unique Idempotency-Key and keep replyToMessageId as the WhatsApp messageId. Preserve the same endpoint, body, sender and key for retries of the same action. Enforce consent and the service window; use an approved template when required. Only mark eligible inbound messages read when the user actually opens/reads them.
Update your own interface
Receive signed events on your backend. Verify raw-body signatures and timestamp tolerance, durably enqueue and deduplicate by event ID, then return 2xx. Broadcast only authorized updates through your own websocket/SSE or use polling. Reconcile history after reconnecting. Events can repeat or arrive out of order; never regress read/delivered to an older state.
Show billing in your application
Use billing:read and usage:read for read-only displays. Request balances, credit history, usage, current plan and invoices from your backend, following the documented pagination. Generate purchases from the authoritative catalog and a server quote, then open the supported Razorpay Checkout. Verify the result on your backend and refresh plan/credits only after confirmed fulfillment. Collect explicit customer approval before purchases or subscription changes. Your frontend styling does not remove provider identity, business verification, invoice issuer or payment consent requirements.
Integration acceptance checklist
Use an authorized test workspace and consenting recipient before production.
- Verify that a user cannot request another workspace’s messages, invoices or billing documents through your application.
- Verify inbound history, reply context, closed-window handling, delivered/read/failed events and reconnection without duplicate sends.
- Verify signature rejection, duplicate events, out-of-order delivery, pagination and key revocation.
- Verify pending/cancelled/failed checkout and successful server-confirmed fulfillment; reconcile timeouts before retrying.
- Verify restricted scopes, expired subscription recovery, stale profile/plan versions and sanitized logs. Never log credentials or raw customer messages.
Need help with this guide? Contact support