Skip to main content

WhatsApp Webhook

POST/external/whatsappOpen in the API playground →
Info

Receive and process WhatsApp messages via Agent-TS. Kapso is the supported transport; /api/v1/external/whatsapp remains only as a compatibility test bridge.

Endpoints

MethodEndpointDescription
POST/api/v1/external/whatsappCompatibility test bridge
GET/api/v1/webhooks/whatsappMeta webhook verification
POST/api/v1/webhooks/whatsappMeta webhook messages

External Client Request

eventstringbodyrequired

Event type (e.g., message)

messagestringbodyrequired

Message content from user

fromstringbodyrequired

WhatsApp ID (e.g., 23279648205@c.us)

phoneE164stringbodyrequired

Phone number in E.164 format


Response

answerstring

Agent response message

statusstring

Processing status (success, error)


Examples

Request
cURL
curl -X POST "https://demo.api.vultlocal.com/api/v1/external/whatsapp" \
-H "Content-Type: application/json" \
-d '{
"event": "message",
"message": "What is my balance?",
"from": "23279648205@c.us",
"phoneE164": "+23279648205"
}'
Response
200 Success
{
"answer": "Your balance is 5,000 SLE",
"status": "success"
}
200 Unregistered User
{
"answer": "You are not registered. Reply with your full name to register.",
"status": "success"
}
400 Invalid Request
{
"error": "Missing required field: message",
"status": "error"
}

Meta Business API

Verification (GET)

Meta sends a verification request when setting up the webhook:

GET /api/v1/webhooks/whatsapp?hub.mode=subscribe&hub.verify_token=YOUR_TOKEN&hub.challenge=CHALLENGE

Return hub.challenge if hub.verify_token matches.

Messages (POST)

Meta sends incoming messages as POST requests with the message payload.


Agent-TS Webhooks

Detailed webhook configuration and message handling