Skip to Content
Getting Started

Getting Started

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.

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.

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 Passing template variables for details.

Register your webhook (optional)

Register a webhook to receive real-time delivery reports (sent, delivered, read, failed) and customer reply events.

Next steps