Send template message
- Navigate to the BIK dashboard and locate the template ID in the Templates section. If you cannot find it, contact your account manager.

The following six common template message types are supported:
Advanced template types (e.g., QRBs, List, Cart) can be triggered through the Flow API.
Request parameters
| Name | Type | Required/Optional | Description |
|---|---|---|---|
medium | string | Required | The delivery channel for the message (currently only whatsapp is supported) |
contactIdentifier | string | Required | The recipient's phone number |
type | string | Required | The template type: CAROUSEL or DEFAULT |
businessPhoneNumber | string | Optional | The business phone number from which the message is sent |
payload | BikTemplateMessagePayload or BikCarouselMessagePayload | Required | The template message payload object. Refer to the type definitions for BikTemplateMessagePayload, BikCarouselMessagePayload. |
callbackData | string | Optional | V2 only. Stringified JSON (max 1024 characters) for passing metadata (e.g. order ID, campaign name). Must be valid, parseable JSON. This value is echoed back in status-update and link-click webhooks. |
Callback data (callbackData) — V2 only
callbackData is supported only in the Send Template Message V2 API. It is not available in the deprecated V1 API.
Use callbackData to attach metadata to the message that will be returned in delivery/status and link-click webhooks (e.g. for order mapping, campaign attribution, or analytics).
- Format: A string containing valid JSON (e.g.
JSON.stringify({ "order_id": "ORD123", "campaign": "summer_sale" })). - Validation: Must be a non-empty string, parseable as JSON, and must not exceed 1024 characters. If validation fails, the request returns
400with an error message.
Request Information
- Send Template Message V2
- Send Template Message
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/v2/sendTemplateMessage |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/v2/sendTemplateMessage' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"appId": "APP_ID",
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"payload": {
"templateId": "TEMPLATE_ID",
"components": {
"header": [
{
"type": "image",
"data": "https://testimageurl.com/testimage.png"
}
],
"body": [
"Test"
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.google.com"
}
]
}
},
"callbackData": "{\"order_id\":\"ORD123\",\"campaign\":\"summer_sale\"}"
}'
JSON response example:
{
"status": 200,
"success": true,
"data": {
"id": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSMTJCRTg3M0MxREUyNkURatyAA=="
}
}
Response parameters
| Name | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | Indicates whether the request succeeded |
data | Response | Contains the message ID |
Note:
API version 1 is deprecated. Please use v2.
| Category | Value |
|---|---|
| Http request | POST |
| URL | https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/sendTemplateMessage |
Sample request
curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-messages/sendTemplateMessage' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AUTH_TOKEN' \
--data '{
"appId": "APP_ID",
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"payload": {
"templateId": "TEMPLATE_ID",
"components": {
"header": [
{
"type": "image",
"data": "https://testimageurl.com/testimage.png"
}
],
"body": [
"Test"
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.google.com"
}
]
}
}
}'
JSON response example:
{
"status": 200,
"success": true,
"response": {
"id": "wamid.HBgMOTE5OTM4NDM4MTM4FQIAERgSMTJCRTg3M0MxREUyNkURatyAA=="
}
}
Response parameters
| Name | Type | Description |
|---|---|---|
status | number | HTTP status code |
success | boolean | Indicates whether the request succeeded |
response | Response | Contains the message ID |
Errors
| Error Code | Meaning |
|---|---|
| 400 | Invalid payload -- Your request is invalid. |
| 401 | Unauthorized -- User is not authenticated. |
| 404 | Not Found -- The specified API could not be found. |
| 407 | Invalid template -- Invalid whatsapp template id. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
Error response example:
{
"status": 407,
"error": "Invalid whatsapp template id"
}
The individual sections of the WhatsApp template conform to the WhatsApp message payload schema. For details, refer to the official documentation here.