WapBridge REST API Docs

Send WhatsApp messages in minutes.

Use the REST API to send messages and receive events via webhooks. Simple endpoints, clear responses, and secure authentication.

Quick Start

1) Create an instance and connect WhatsApp.

2) Generate your API token from /settings.

3) Send your first message using the endpoint below.

Base URL
http://wapbrigde.com
Authentication

Use the token generated in Settings. Include it as a bearer token.

Authorization: token <API_KEY>:<API_SECRET>
Send Message

POST /api/method/wap_bridge.api.whatsapp.send_api_message

Body

  • from_number – WhatsApp number connected to your instance
  • to_number – destination number (with country code)
  • message – text content
curl -X POST http://wapbrigde.com/api/method/wap_bridge.api.whatsapp.send_api_message \ -H "Authorization: token {{ api_key }}:{{ api_secret }}" \ -H "Content-Type: application/json" \ -d '{"from_number":"+255700000000","to_number":"+255755123456","message":"Hello from WapBridge"}'
Send Media

POST /api/method/wap_bridge.api.whatsapp.send_api_message

Body

  • from_number – WhatsApp number connected to your instance
  • to_number – destination number (with country code)
  • media_data – base64 file content (no data URL prefix)
  • mime_type – e.g. image/jpeg
  • filename – original file name
  • caption – optional text caption
curl -X POST http://wapbrigde.com/api/method/wap_bridge.api.whatsapp.send_api_message \ -H "Authorization: token {{ api_key }}:{{ api_secret }}" \ -H "Content-Type: application/json" \ -d '{"from_number":"+255700000000","to_number":"+255755123456","caption":"Invoice attached","media_data":"<base64>","mime_type":"application/pdf","filename":"invoice.pdf"}'
Response
{ "ok": true, "service": { "ok": true, "id": "true_1234567890" } }
Webhooks

Configure your webhook URL in Settings. WapBridge will send inbound messages to your endpoint.

Header (optional)

X-Wapbridge-Secret: <your-secret>
Webhook Payload
{ "instance_id": "INST-01-0000142", "customer": "CUST-0143", "phone_number": "255757197676", "message": { "id": "false_120542636048510@lid_A586DC71E697153420998E09871EA237", "from": "120542636048510@lid", "to": "255757197676@c.us", "body": "Sawa", "fromMe": false, "timestamp": 1767791640, "type": "image", "hasMedia": true, "caption": "Sawa", "media": { "mimetype": "image/jpeg", "filename": "photo.jpg", "data": "<base64>" } } }