Payload examples for send template message
Sending a message with only text

Sample payload:
{
"medium": "whatsapp",
"contactIdentifier": "+919900900900",
"payload": {
"templateId": "2iUKSaBPsoer1rUE33aW",
"components": {
"body": [
"USER_NAME", "565656"
]
}
}
}
Sending a message with only image + text

{
"contactIdentifier": "+919999999999",
"medium": "whatsapp",
"payload": {
"templateId": "hHflM320sgf6VANSF1Ow",
"components": {
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"body": [
"variable1",
"variable2",
]
}
}
}
Sending a message with text + CTA

- An image can optionally be included in the header.
{
"contactIdentifier": "+919999999999",
"medium": "whatsapp",
"payload": {
"templateId": "hHflM320sgf6VANSF1Ow",
"components": {
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"body": [
"variable1",
"variable2",
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.bik.ai"
}
]
}
}
}
Sending a message with carousel
{
"contactIdentifier": "+919999999999",
"medium": "whatsapp",
"type": "CAROUSEL",
"payload": {
"templateId": "TEMPLATE_ID",
"components": {
"body": ["Test message."],
"carousel": [
{
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"body": [
"variable1",
"variable2"
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.bik.ai"
}
]
},
{
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"body": [
"variable3",
"variable4"
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.bik2.ai"
}
]
}
]
}
}
}
Sending a message with copy code
{
"contactIdentifier": "+919999999999",
"medium": "whatsapp",
"type": "DEFAULT",
"payload": {
"templateId": "TEMPLATE_ID",
"components": {
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"body": [
"variable1",
"variable2",
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.bik.ai"
},
{
"type": "copy_code",
"index": 1,
"data": "test data"
}
]
}
}
}
Sending a message with LTO
{
"contactIdentifier": "+919999999999",
"medium": "whatsapp",
"type": "DEFAULT",
"payload": {
"templateId": "TEMPLATE_ID",
"components": {
"header": [
{
"type": "image",
"data": "https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FOeeDDiiwGDXkoAWs2hroxSgY2ny1%2FScreenshot%202022-10-17%20at%205.04.52%20PM.png?alt=media&token=9db86f1d-6cf5-4886-8051-760876e52cff"
}
],
"limited_time_offer":[
{
"type": "limited_time_offer",
"data": "123456789000"
}
],
"body": [
"variable1",
"variable2"
],
"button": [
{
"type": "URL",
"index": 0,
"data": "https://www.bik.ai"
},
{
"type": "copy_code",
"index": 1,
"data": "test data"
}
]
}
}
}
BikTemplateMessagePayload type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
templateId | string | Required | The WhatsApp template identifier |
components | BikTemplateComponents | Required | The template component configuration |
BikTemplateComponents type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
header | BikTemplateHeader[] | Optional | Array of header components |
body | string[] | Optional | Array of body variable values |
button | BikTemplateButton[] | Optional | Array of button components |
limited_time_offer | BikTemplateButton[] | Optional | Limited-time offer component |
BikTemplateHeader type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
type | string | Required | The header content type: image, video, document, or text |
data | string | Required | The header value (text string or media URL) |
fileName | string | Optional | File name (applicable only for the document type) |
BikTemplateButton type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
type | string | Required | The button type: URL, MPM, copy_code, catalog, or limited_time_offer |
index | int | Required | Zero-based index of the button |
data | string | Required | The button value (text string or URL) |
Do not include a Button object if the button type is MPM.
BikCarouselMessagePayload type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
templateId | string | Required | The WhatsApp template identifier |
components | BikCarouselComponents | Required | The carousel component configuration |
BikCarouselComponents type
| Name | Type | Required/Optional | Description |
|---|---|---|---|
body | string[] | Required | Array of body variable values for the carousel header |
carousel | BikTemplateComponents[] | Required | Array of carousel card components |