Skip to Content
Send WhatsApp MessageSend a Message

Send WhatsApp Messages

Send an approved WhatsApp template message to any phone number.

POST /v1/whatsapp/send

Request body

FieldTypeRequiredDescription
tostringRecipient phone number in E.164 format (e.g. +254700000000)
phone_number_idstringYour sending phone number id from /v1/whatsapp/phone_numbers
template_namestringThe template name from the templates endpoint
language_codestringThe template language from the templates endpoint (e.g. en_US)
variablesobjectTemplate placeholder values. See Template Variables.
media_urlstringPublic URL of media to use as template header. Alternative to media_id. See Sending with Media.
media_idstringmedia_id from the upload endpoint. Alternative to media_url. See Sending with Media.
catalog_idstringMeta catalog ID the products in variables.cards belong to. Required for Product Carousels.
locationobjectFor location templatesLatitude, longitude, name, and address for a template with a location header. See Location Templates.

The variables object holds one entry per template section:

FieldTypeDescription
variables.headerobjectHeader placeholder values, keyed by param_name
variables.bodyobjectBody placeholder values, keyed by param_name
variables.buttonsobjectDynamic URL button values, keyed by button position. See Button Variables.
variables.cardsobjectCarousel cards, keyed by card position starting at "1". See Carousels.

Use the exact template_name and language_code as returned by the templates endpoint. Phone numbers are identified by their phone number ID (id field), not the phone number itself.

Sending a message template

If the template has no placeholders, omit the variables field entirely.

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": "123456789", "template_name": "hello_world", "language_code": "en_US" }'

Response

{ "success": true, "message_id": "wamid.HBgNMjU0NzAwMDAwMDAwFQIAERgSNDQ1...", "to": "+254700000000", "template": "order_confirmation" }

A successful response means the request was accepted — it does not guarantee delivery. Use webhooks to track delivery status (sent, delivered, read, failed).


Choose your scenario

Everything else you can send is a variation on the request above.