ChatGeniusPricingAboutBlog Login
Meta Meta Verified Tech Provider

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.

Start Free Trial

$29/month add-on  ·  Creator and above  ·  7-day free trial  ·  Full developer docs →

Built On

Meta OpenAI Stripe Twilio Pusher Google Calendar

How the API Works

One integration, four channels — events in, messages out

1

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.

2

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.

3

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.

4

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

CRM Integration

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.

Custom AI

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.

E-Commerce

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.

Healthcare & Pharmacy

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.

Paid Acquisition

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.

Bookings & Reminders

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

Feature
Free
Creator
Pro
Business
Webhook + Send API add-on
-
+$29/mo
+$29/mo
+$29/mo
Facebook DM & Instagram DM events
-
SMS events & outbound (requires SMS tier)
-
-
WhatsApp events & templates (requires WhatsApp tier)
-
-
External Reply Mode (per-channel + global)
-
Inbound Body Purge (SMS & WhatsApp)
-
-
Dead-letter queue
-
See full pricing details →

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

Which platforms does the Webhook + Send API support?+
Four platforms in one API: Facebook DM, Instagram DM, SMS (via Twilio), and WhatsApp Business (via Meta Cloud API). Same authentication, same idempotency, same HMAC-SHA256 signing secret, and the same response shape across all four. Inbound events are forwarded to your webhook with a platform identifier, and outbound messages route based on conversation_id, platform_user_id, or to_phone in the request body.
What events are forwarded via webhooks?+
ChatGenius forwards 7 event types: 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.
How is webhook authentication handled?+
Every webhook payload is signed with HMAC-SHA256 using your per-client webhook secret. The signature is sent in the X-ChatGenius-Signature header. Your server verifies the signature by computing HMAC-SHA256 of the raw request body with your secret and comparing it to the header value.
What happens if my webhook endpoint is down?+
ChatGenius retries failed deliveries up to 6 times with exponential backoff (30s, 1m, 5m, 15m, 1h, 4h). If all 6 attempts fail, the event is moved to a dead-letter queue visible in your dashboard. You can replay dead-letter events manually once your endpoint is back online. Note: if Inbound Body Purge is enabled for compliance, SMS and WhatsApp inbound events use exactly one delivery attempt with no retries so the message body can be scrubbed within a tight window.
Can I send WhatsApp templates via the Send API?+
Yes. Send free-form WhatsApp text inside the 24-hour window or approved templates any time outside it through the same /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.
Can I send SMS via the Send API?+
Yes. Send SMS through the same Send-Reply endpoint by including 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.
What is External Reply Mode?+
External Reply Mode disables ChatGenius AI entirely for a specific conversation, a single channel (SMS-only or WhatsApp-only via per-channel AI Assistant toggles), or all channels at once (Global External Reply Mode). When enabled, inbound messages are still forwarded to your webhook but ChatGenius does not generate or send any AI response. Your backend sends replies through the Send API instead, giving you full control over the conversation logic.
What is Inbound Body Purge?+
A per-account compliance toggle for SMS and WhatsApp. When enabled, ChatGenius forwards inbound message bodies to your webhook with one delivery attempt (no retries) and immediately scrubs the body from local storage — 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.
Are there rate limits on the Send API?+
The Send API respects each platform's documented limits: 300 calls/second for Facebook text, 100 calls/second for Instagram, Twilio's account-specific limits for SMS, and Meta Cloud API limits for WhatsApp. ChatGenius includes built-in rate tracking to prevent exceeding these limits. Idempotency keys prevent duplicate sends if you retry a request.
How do I set up the Webhook + Send API?+
In your ChatGenius dashboard, go to Settings > Webhook + Send API. Enter your endpoint URL, choose which event types to subscribe to (FB DM, IG DM, SMS, WhatsApp), and ChatGenius generates a per-client API key and webhook secret. You can rotate both at any time. The API key authenticates outbound Send API requests, and the webhook secret verifies inbound event signatures. SMS event subscription requires a provisioned Twilio number and Pro+ tier; WhatsApp event subscription requires WhatsApp connected on Pro+. Full developer reference at /docs/chatgenius-webhook-api.

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

Read the full developer documentation →

Start Free Trial