Skip to main content

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

NameTypeRequired/OptionalDescription
messagestringRequiredMessage details
hasPreviewUrlbooleanOptionalHas contain preview url

BikMediaMessagePayload Type

NameTypeRequired/OptionalDescription
typestringRequiredMedia type (image, video, document)
mediaBikMediaMessageObjectRequiredMedia message details

BikMediaMessageObject Type

NameTypeRequired/OptionalDescription
mediaLinkstringRequiredMedia link
captionstringOptionalMedia caption

BikInteractiveMessagePayload Type

NameTypeRequired/OptionalDescription
typestringRequiredButton type (options, buttons)
bodystringRequiredMessage body
headerTitlestringRequiredMessage header title
footerTitlestringRequiredMessage footer title
sectionBikInteractiveActionRequiredMessage action details
headerBikInteractiveHeaderOptionalMessage header details

BikInteractiveAction Type

NameTypeRequired/OptionalDescription
buttonTitlestringOptionalButton title
sectionTitlestringOptionalSection title
payloadBikInteractiveActionPayload[]RequiredMedia caption

BikInteractiveAction Type

NameTypeRequired/OptionalDescription
idstringRequiredAction ID
namestringRequiredAction name

BikInteractiveHeader Type

NameTypeRequired/OptionalDescription
typestringRequiredMedia type (image, video, document)
(image, video, document)BikMediaMessageObjectRequiredHeader details

BikAddressMessagePayload Type

NameTypeRequired/OptionalDescription
messagestringRequiredAddress message
addressAddressRequiredAddress details

Address Type

NameTypeRequired/OptionalDescription
idstringRequiredAddress ID
namestringRequiredAddress name
phone_numberstringRequiredPhone number details
pin_codestringRequiredPin code details
floor_numberstringRequiredFloor number
building_namestringRequiredBuilding name
addressstringRequiredAddress details
landmark_areastringRequiredLandmark details
citystringRequiredResidence city
countrystringRequiredCountry

BikProductMessagePayload Type

NameTypeRequired/OptionalDescription
messagestringRequiredAddress message
footerTextstringOptionalFooter text
headerTextstringOptionalHeader text
catalogIdstringRequiredCatalog ID
variantIdstringOptionalVariant ID
sectionsBikProductSectionOptionalList of section details

BikProductSection Type

NameTypeRequired/OptionalDescription
titlestringRequiredSection title
variantIdsstring[]RequiredList of variant ids