👋 How can we help?

All practical tips to grow your business with messaging.

All CollectionsIntegrationsREST API: WhatsApp Templates

REST API: WhatsApp Templates

Send WhatsApp template messages programmatically using the Bugalou REST API. Manage templates and variables.

Overview

The WhatsApp Templates API allows you to send approved WhatsApp template messages programmatically. This is useful for sending automated confirmations, reminders, and notifications from external systems. You need an API key to authenticate.

Authentication

Include your API key in every request:

  • X-API-Key: bg_live_your_key_here
  • Authorization: Bearer bg_live_your_key_here

Send a Template Message

POST https://app.bugalou.com/api/templates/send
Authorization: Bearer bg_live_your_api_key_here
Content-Type: application/json

{
  "template": "order_bevestiging",
  "phone": "31612345678",
  "variables": { "name": "Jan", "order": "12345" }
}

Parameters

FieldTypeRequiredDescription
templatestringYesTemplate name (e.g. order_bevestiging)
phonestringYesPhone number with country code, no + (e.g. 31612345678)
variablesobjectNoKey-value pairs for template placeholders

List Available Templates

GET https://app.bugalou.com/api/templates/send
Authorization: Bearer bg_live_your_api_key_here

Returns an array of all approved templates with their names and expected variables.

Example Templates

  • verificatie_code — send a verification code
  • order_bevestiging — order confirmation with order number
  • order_verzonden — shipping notification with tracking info
  • afspraak_herinnering — appointment reminder
  • factuur_herinnering — invoice payment reminder

The number of API calls available depends on your plan.

Response Format

Success: {"success": true, "messageId": "..."}

Error: {"error": "Invalid or expired API key"} (401) or {"error": "Template not found"} (404)

Use Cases

  • E-commerce: Send order confirmation and shipping updates from your webshop
  • Service businesses: Send appointment reminders and invoice notifications
  • Custom apps: Trigger WhatsApp messages from any system via HTTP