Skip to main content
POST
/
messages
/
send-template
Send a template message
curl --request POST \
  --url https://api.bitbybit.studio/whatsapp/open/v1/messages/send-template \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "to": "6281234567890",
  "template_name": "welcome_message",
  "template_source": "CRM",
  "sources": "whatsapp cloud api",
  "params": [
    "John",
    "Order123",
    "2024-01-01"
  ],
  "mediaUrl": "<string>",
  "ignoreActiveTicket": false,
  "countryCode": "ID"
}
'
{
  "data": {
    "messageId2": "<string>",
    "timestamp": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. Create one in Settings > Developer.

Body

application/json
to
string
required

Destination phone number

Example:

"6281234567890"

template_name
string
required

Name of the approved WhatsApp template

Example:

"welcome_message"

template_source
enum<string>
required

Template source — CRM for business templates, AUTH for OTP

Available options:
CRM,
AUTH
sources
enum<string>

Messaging channel to use

Available options:
whatsapp cloud api,
whatsapp coex
params
string[]

Dynamic parameters to insert into the template placeholders

Example:
["John", "Order123", "2024-01-01"]
mediaUrl
string

Custom media URL for media templates — overrides the template default

ignoreActiveTicket
boolean
default:false

If true, skip sending when the chat is actively handled by an agent

countryCode
string | null

Country code for number formatting

Example:

"ID"

Response

Template message sent successfully

data
object