Webhook Setup
Webhooks are how Meta delivers every inbound message, delivery status, and template update to Switchbord. Without a correctly configured webhook, your inbox will not receive messages. This guide covers the exact steps to configure Meta webhooks — whether you are using the hosted platform atapp.switchbord.ai or a self-hosted instance.
How It Works
When a user sends a message to your WhatsApp number, Meta calls your webhook URL with the event payload. Switchbord:- Verifies the signature using your App Secret
- Stores the raw envelope in Supabase
- Routes the event to the operator inbox in real time
?w= query parameter on the webhook URL tells Switchbord which workspace the event belongs to. This is how multi-tenancy works — each workspace has a unique callback URL.
Step-by-Step Setup
1
Find your Workspace ID
In Switchbord, go to Settings → General. Copy your Workspace ID — it is a UUID that looks like
a1b2c3d4-....You will append this to the webhook callback URL in the next step.2
Configure the callback URL in Meta
In Meta for Developers, open your app and go to:WhatsApp → Configuration → WebhookClick Edit and set:
-
Callback URL:
Replace
{your-workspace-id}with the UUID from the previous step. For self-hosted instances, replaceapi.switchbord.aiwith your own API domain. -
Verify token: A string you choose. You will also enter this in Switchbord Settings. Use a random string — for example,
openssl rand -hex 20in a terminal.
3
Subscribe to webhook fields
After saving the callback URL, scroll down to Webhook fields and click Manage.Subscribe to the following fields:
Click Done.
You only need
messages for core inbox operation. Additional fields like message_template_status_update
can be added later for template sync notifications.4
Set the verify token in Switchbord
In Switchbord, go to Settings → Provider → Channel.Enter the Verify token — the same string you used in the Meta webhook configuration.Save the settings.
5
Set the webhook signing secret
The signing secret is your Meta App Secret. Switchbord uses it to verify the
X-Hub-Signature-256 header on every incoming webhook — if the signature does not match, the payload is rejected.Find your App Secret:In Meta for Developers, open your app → App Settings → Basic.Click Show next to App secret and copy the value.In Switchbord, go to Settings → Provider → Channel and enter the App Secret as the Webhook signing secret.6
Verify the setup is working
Send a test message to your WhatsApp number from a real phone. Then:
- Open Switchbord → Inbox — the message should appear within a few seconds
- Open Switchbord → Operations — look for a recent webhook entry with status
verified
- Check the Operations page for rejected webhooks (a red status means signature verification failed)
- Confirm the App Secret in Settings matches the one in Meta App Settings → Basic
- Confirm your WhatsApp number is in Live mode (not Development) — Development mode only receives messages from testers
Why the ?w= Parameter Matters
Switchbord is multi-tenant. Multiple workspaces can share a single API deployment, each with its own WhatsApp number and credentials.
The ?w= parameter is how Switchbord routes the incoming webhook to the correct workspace. Without it, the webhook ingress cannot determine which workspace to assign the event to and will reject the payload.
Each workspace gets its own callback URL:
api.switchbord.ai host.
Credential Reference
Troubleshooting
Webhook verification fails immediately- Ensure the API is publicly reachable.
localhostwill not work — use a tunnel (ngrok, Cloudflare Tunnel) for local development. - The callback URL must include the
?w=parameter with a valid workspace UUID. - The verify token in Meta must exactly match the one in Switchbord Settings.
- Check Operations for webhook rejections. A
signature_mismatcherror means the App Secret in Switchbord does not match the one in Meta. - Make sure the
messagesfield is subscribed in Meta’s webhook field manager. - Confirm the phone number is in Live mode, not Development mode.
- Meta retries failed webhooks. If your API was temporarily unreachable, events will be replayed automatically.
- Check the Operations page for a queue of pending replays.
- See the Operations Runbook for escalation steps.
Related Guides
- Connect WhatsApp — full credential setup including WABA ID, phone number, and System User token
- Meta Credential Setup — detailed guide for System User tokens and Business Portfolio setup
- Webhook Operations — internal webhook model, envelope schema, and replay tooling