1. Get an API key
In the dashboard, go to Settings → Developers → API keys, click Create API key and copy it. Your server uses it to send replies.2. Write the handler
The handler verifies the signature, then replies to every routed message.- Node.js
- Python
server.mjs
3. Expose it over HTTPS
Wassist needs a public URL to deliver to. Locally, a tunnel is the quickest option:https://…ngrok.app URL it prints. Any HTTPS host works too: Vercel, Cloudflare Workers, Railway, your own server.
4. Create the webhook
1
Add the webhook
Go to Settings → Developers → Webhooks and click Create webhook. Set the URL to your tunnel plus
/webhook, e.g. https://abc123.ngrok.app/webhook.2
Keep the routing event ticked
All events are ticked by default. Make sure Subscription message received stays on. That’s the event routed messages arrive as, and a webhook without it silently gets nothing.
3
Copy the signing secret
The secret is shown once, straight after you create the webhook.
5. Route the sandbox to your webhook
1
Open the sandbox number
Go to Numbers and click the number under Sandbox numbers.
2
Switch routing to your webhook
In Routing, set Mode to Webhook: forward to your endpoint, pick the webhook you just created, and click Save routing.
400.
6. Say hi
From the phone you signed in with, sendhi to the sandbox number:
What your endpoint receives
message.body is the text (or the image caption, or the voice note transcription). Images and voice notes also arrive as URLs in media, and tapped buttons in buttons. Use conversationId for everything you send back.
Make it an agent
Swap the hello world line for your own logic. A typical handler shows a typing indicator, calls your agent, then replies:Using Vercel eve
If your agent is built with Vercel eve, you don’t need to write the handler at all.@wassist/eve is a drop-in channel that verifies webhooks, shows typing indicators and sends replies:
agent/channels/whatsapp.ts
WASSIST_API_KEY and WASSIST_WEBHOOK_SECRET from the environment and listens on /eve/v1/wassist. Point your webhook there and follow step 5 above.
Going live
Connect your own WhatsApp number, then route it the same way: Numbers → your number → Routing → Webhook. On your own numbers you can also do it from code, and route individual conversations:Next steps
Managed agent
Let Wassist run the agent instead.
Conversation routing
Mix agents and webhooks per number and per conversation.