Webhook + Send API for DMs, SMS & WhatsApp
One bidirectional API for Facebook DM, Instagram DM, SMS, and WhatsApp. Receive inbound events (message received, lead captured, escalation) via signed HTTPS webhooks and send outbound free-form messages or approved WhatsApp templates through one REST endpoint. HMAC-SHA256 signing, 6-attempt retry with exponential backoff, dead-letter queue, External Reply Mode for your own AI, and Inbound Body Purge for compliance-strict deployments.
$29/month add-on · Creator and above · 7-day free trial · Full developer docs →
How the API Works
One integration, four channels — events in, messages out
Configure Your Endpoint
In your ChatGenius dashboard, enter your webhook URL and pick which channels to subscribe to (FB DM, IG DM, SMS, WhatsApp). The system generates a per-client API key and HMAC webhook secret. Both are rotatable at any time.
Receive Inbound Events
When a DM, SMS, or WhatsApp message arrives — or a lead is captured or a conversation escalates — ChatGenius sends a signed webhook to your endpoint with the full event context, customer metadata, and platform identifier.
Send Outbound Messages
Use the Send API to reply to conversations across all four channels. Pick the recipient with conversation_id, platform_user_id, or to_phone. Send free-form text, reactions (Meta only), or approved WhatsApp templates. Idempotency keys prevent duplicates.
External Reply Mode & Body Purge
Disable AI per-channel or globally to run your own logic — ChatGenius becomes a pure relay. Optional Inbound Body Purge scrubs SMS and WhatsApp message bodies from our storage immediately after forward, for compliance-strict deployments.
API Features
Production-grade integration infrastructure across DMs, SMS, and WhatsApp
Four Channels, One API
Facebook DM, Instagram DM, SMS, and WhatsApp Business through the same authentication, idempotency, signing secret, and response shape. Route by conversation_id, platform_user_id, or to_phone — the platform field auto-detects from your routing key or you can set it explicitly for WhatsApp.
Bidirectional Communication
Inbound webhooks forward message, lead, and escalation events to your server. Outbound Send API lets you reply with free-form text, send WhatsApp approved templates, react to DM messages, or show typing indicators. Both directions work independently.
HMAC-SHA256 Signing
Every webhook payload is signed with your per-client secret. Verify the X-ChatGenius-Signature header to ensure events are authentic and haven't been tampered with in transit.
6-Attempt Exponential Retry
Failed webhook deliveries retry at 30s, 1m, 5m, 15m, 1h, and 4h intervals. After 6 failures, events land in a dead-letter queue that you can replay from the dashboard.
Dead-Letter Queue
Events that exhaust all retry attempts are stored in a dead-letter queue. View failed deliveries in your dashboard, inspect payloads, and replay them once your endpoint is healthy.
Per-Client API Keys
Each client gets a unique API key for Send API authentication and a separate webhook secret for signature verification. Both support instant rotation without downtime.
Idempotency Keys
Include an idempotency key with Send API requests to prevent duplicate message delivery. If your server retries a failed request, ChatGenius recognizes the key and skips the duplicate.
WhatsApp Approved Templates
Send WhatsApp approved templates (utility, authentication) any time outside the 24-hour window. Pass template_name, template_language, and template_components alongside to_phone. Components route to Meta's Cloud API verbatim — text, image, video, or PDF headers, named body variables, and CTA buttons all honored.
Inbound Body Purge for Compliance
Per-account toggle for SMS and WhatsApp. When on, ChatGenius forwards inbound message bodies to your webhook with one delivery attempt and immediately scrubs the body from our storage — messages, webhook event log, SMS queue, and downloaded WhatsApp media files. Conversations become metadata-only locally. Designed for healthcare-adjacent and privacy-strict workflows where your server is the system of record.
SMS via Twilio, A2P 10DLC Compliant
Outbound SMS routes through ChatGenius to Twilio with the sender phone number server-controlled to your provisioned A2P 10DLC number — you cannot override from_phone, which keeps your campaigns compliant. Inbound SMS is forwarded as sms.message_received with text, encoding, and segment count.
Use Cases
Sync All Channels to Your CRM
Every inbound DM, SMS, and WhatsApp message plus captured leads forwarded to your webhook. Parse the event and create contacts, deals, or tickets in HubSpot, Salesforce, GoHighLevel, or any CRM with an API. Same payload shape across all four channels.
Run Your Own AI Agent
Enable External Reply Mode (per-channel or global) to disable ChatGenius AI. Your backend receives all inbound messages via webhooks, processes them with your own model, and sends replies through the Send API across DMs, SMS, and WhatsApp.
Order & Shipping Notifications
When an order ships, your backend sends a WhatsApp utility template (with carrier image header) or SMS via the Send API with tracking info. No manual messaging needed — your fulfillment system triggers the notification automatically.
Compliance-Strict Pure Relay
For healthcare-adjacent workflows where your server is the system of record. Enable Inbound Body Purge for SMS and WhatsApp: ChatGenius forwards bodies to your webhook with one delivery attempt and immediately scrubs them locally. Refill reminders and patient notifications sent via Send API.
CTWA Ad-to-CRM Pipeline
Click-to-WhatsApp ad referrals (ad ID, headline, body, click ID) are captured on the first inbound message and included in the whatsapp.message_received webhook payload. Push every ad-driven WhatsApp lead straight into your attribution stack.
Appointment Reminder Automation
Your scheduler fires a 24-hour-out WhatsApp template via the Send API. If the customer replies inside the 24-hour window, free-form text confirms or reschedules. Outside the window, fall back to a follow-up template — all routed through one API.
Plan Availability
SMS event subscription requires Pro+ tier and a provisioned ChatGenius (Twilio) number. WhatsApp event subscription requires WhatsApp connected on Pro+ via Meta Embedded Signup.
Webhook & Send API Questions
conversation_id, platform_user_id, or to_phone in the request body.message_received (Facebook or Instagram DM), reel_shared (reel sent in DM), post_shared (Instagram post sent in DM), sms.message_received (inbound SMS to your provisioned ChatGenius number), whatsapp.message_received (inbound WhatsApp to your connected business number — text, image, audio, video, document, sticker, location, contacts, or interactive button reply), lead_captured (contact info extracted from any channel), and escalation (conversation escalated to human). Each event includes full conversation context, customer metadata, and platform identifiers./v1/send endpoint. Pass template_name, template_language (e.g. en_US), and template_components alongside to_phone and platform: "whatsapp". Templates are passed through to Meta's Cloud API verbatim, so any header (text/image/video/PDF), body variable, or button parameter you defined in the template editor is honored.to_phone in E.164 format (the platform auto-sets to sms). Sender phone number is automatically your client's provisioned Twilio number — server-controlled to enforce A2P 10DLC compliance. Each successful outbound API call counts as 1 toward your monthly SMS quota regardless of how many segments Twilio splits the message into. SMS access requires Professional or Business tier and a provisioned number.meta_messages, the outbound webhook event log, the SMS webhook queue, and any downloaded WhatsApp media files on disk. Conversation rows in the unified inbox become metadata-only (message ID, timestamp, sender E.164, direction, delivery status, ticket_ref). Designed for healthcare-adjacent and privacy-strict scenarios where your server is the system of record. Requires AI off for SMS and WhatsApp (or Global External Reply Mode globally) since purge clears the same context AI uses to reply.Works Great With
Connect Your Stack to DMs, SMS & WhatsApp
One API for four channels. Start your 7-day free trial — no credit card required.
Start Free Trial