Payload examples for send single message
Below are the types of messages that can be used to send messages (including text, media) and template messages.
Sending a text message
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "text"
"payload": {
"message": "This is a test message."
}
}
Sending an image message
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "image"
"payload": {
"type": "image",
"media": {
"mediaLink": "https://testimageurl.com/testimage.png",
"caption": "Image message"
}
}
}
Sending a video message
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "video"
"payload": {
"type": "video",
"media": {
"mediaLink": "https://testimageurl.com/testimage.mp4",
"caption": "Video message"
}
}
}
Sending a document message
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "document"
"payload": {
"type": "document",
"media": {
"mediaLink": "https://testimageurl.com/testimage.pdf",
"caption": "Document message"
}
}
}
Sending a message with LIST/Option buttons
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "options"
"payload": {
"type": "options",
"body": "Test options message",
"headerTitle": "headerTitle",
"footerTitle": "footerTitle",
"section": {
"buttonTitle": "buttonTitle",
"sectionTitle": "sectionTitle",
"payload": [
{
"id":"12345",
"name":"option 1",
}
]
}
}
}
Sending a message with QRB buttons
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "buttons"
"payload": {
"type": "buttons",
"body": "Test button message",
"headerTitle": "headerTitle",
"footerTitle": "footerTitle",
"section": {
"buttonTitle": "buttonTitle",
"sectionTitle": "sectionTitle",
"payload": [
{
"id":"12345",
"name":"option 1",
}
]
},
"header": {
"type": "image",
"image": {
"mediaLink": "https://testimageurl.com/testimage.png"
}
}
}
}
Sending a message with address
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "address"
"payload": {
"message": "Test is a address message",
"address": {
"id": "1234";
"name": "Test";
"phone_number": "+919909909990";
"pin_code": "110001";
"floor_number": "1";
"building_name": "Apartment";
"address": "5th cross";
"landmark_area": "Near temple";
"city": "Bengaluru";
"country": "IN";
}
}
}
Sending a message with single product
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "single_product"
"payload": {
"message": "Test message"
"footerText":"footerText",
"catalogId":"1234567890",
"variantId":"898989"
}
}
Sending a message with multiple product
{
"contactIdentifier": "+919900990090",
"medium": "whatsapp",
"type": "multiple_product"
"payload": {
"message": "Test message"
"catalogId": "1234567890",
"sections": [
{
"title": "hello",
"variantIds": [
"67676789898",
"45454588665"
]
},
{
"title": "hii",
"variantIds": [
"1234567890",
"2134567890"
]
}
],
"headerText": "header text",
"footerText": "footer text"
}
}
BikTextMessagePayload Type
Name | Type | Required/Optional | Description |
---|---|---|---|
message | string | Required | Message details |
hasPreviewUrl | boolean | Optional | Has contain preview url |
BikMediaMessagePayload Type
Name | Type | Required/Optional | Description |
---|---|---|---|
type | string | Required | Media type (image , video , document ) |
media | BikMediaMessageObject | Required | Media message details |
BikMediaMessageObject Type
Name | Type | Required/Optional | Description |
---|---|---|---|
mediaLink | string | Required | Media link |
caption | string | Optional | Media caption |
BikInteractiveMessagePayload Type
Name | Type | Required/Optional | Description |
---|---|---|---|
type | string | Required | Button type (options , buttons ) |
body | string | Required | Message body |
headerTitle | string | Required | Message header title |
footerTitle | string | Required | Message footer title |
section | BikInteractiveAction | Required | Message action details |
header | BikInteractiveHeader | Optional | Message header details |
BikInteractiveAction Type
Name | Type | Required/Optional | Description |
---|---|---|---|
buttonTitle | string | Optional | Button title |
sectionTitle | string | Optional | Section title |
payload | BikInteractiveActionPayload[] | Required | Media caption |
BikInteractiveAction Type
Name | Type | Required/Optional | Description |
---|---|---|---|
id | string | Required | Action ID |
name | string | Required | Action name |
BikInteractiveHeader Type
Name | Type | Required/Optional | Description |
---|---|---|---|
type | string | Required | Media type (image , video , document ) |
(image , video , document ) | BikMediaMessageObject | Required | Header details |
BikAddressMessagePayload Type
Name | Type | Required/Optional | Description |
---|---|---|---|
message | string | Required | Address message |
address | Address | Required | Address details |
Address Type
Name | Type | Required/Optional | Description |
---|---|---|---|
id | string | Required | Address ID |
name | string | Required | Address name |
phone_number | string | Required | Phone number details |
pin_code | string | Required | Pin code details |
floor_number | string | Required | Floor number |
building_name | string | Required | Building name |
address | string | Required | Address details |
landmark_area | string | Required | Landmark details |
city | string | Required | Residence city |
country | string | Required | Country |
BikProductMessagePayload Type
Name | Type | Required/Optional | Description |
---|---|---|---|
message | string | Required | Address message |
footerText | string | Optional | Footer text |
headerText | string | Optional | Header text |
catalogId | string | Required | Catalog ID |
variantId | string | Optional | Variant ID |
sections | BikProductSection | Optional | List of section details |
BikProductSection Type
Name | Type | Required/Optional | Description |
---|---|---|---|
title | string | Required | Section title |
variantIds | string[] | Required | List of variant ids |