Bahasha WhatsApp API
Send WhatsApp template messages, manage phone numbers and templates, and build real-time message integrations with Bahasha’s Official WhatsApp Business API.
If you are looking to send bulk WhatsApp messages from a dashboard rather than from code, use the Bahasha Dashboard instead.
Base URL:
https://api.bahasha.appAll API endpoints are relative to this base URL. Requests must be made over HTTPS and authenticated with an Authorization: Bearer <key> header.
Quickstart
Up and running in 4 steps.
Create an API key
Go to Settings → API Keys → Create key in your Bahasha dashboard , choose an environment (sandbox or production), and copy your key.
API keys are shown only once when created. Store them securely as environment variables. If you lose a key, revoke it and generate a new one.
Fetch your phone number ID
curl https://api.bahasha.app/v1/whatsapp/phone_numbers \
-H "Authorization: Bearer bh_live_xxxxxxxxxxxx"Save the id field from the response — this is your phone_number_id. It is not the phone number itself. See Phone Numbers.
Fetch your templates
curl https://api.bahasha.app/v1/whatsapp/phone_numbers/<phone_number_id>/templates \
-H "Authorization: Bearer bh_live_xxxxxxxxxxxx"Each template includes an expected_variables field listing all placeholder variables you need to supply when sending. See Templates.
Send your first template message
curl -X POST https://api.bahasha.app/v1/whatsapp/send \
-H "Authorization: Bearer bh_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"to": "+254700000000",
"phone_number_id": "<id-from-step-2>",
"template_name": "hello_world",
"language_code": "en_US"
}'If your template has placeholders, add a variables field. See Template Variables.
Register your webhook (optional)
Register a webhook to receive real-time delivery reports (sent, delivered, read, failed) and customer reply events.
Testing? Use a bh_test_* sandbox key to get realistic responses without sending real messages or spending message credits. See Sandbox Environment.
What you can send
The send endpoint, its request body, and every sending scenario.
Send WhatsApp MessageFill named and positional placeholders in the header and body.
Template VariablesSend one-time passcodes with authentication templates.
Authentication (OTP)Multi-card carousels with per-card variables, and product cards from your catalog.
Media Card CarouselsNext steps
- Authentication — API key types, environments, and best practices
- Phone Numbers — list your connected WhatsApp numbers
- Templates — explore your approved templates and their variables
- Sending with Media — upload, attach, and manage images, videos, and documents
- Contacts — fetch, create, and update contacts with tags and attributes
- Webhooks — receive delivery reports and customer replies at your own endpoint
- Error Codes — status codes and error response shapes