Message Types: Outbound
Outbound messages
Text
Send simple text messages to your customers. These messages can contain emojis. Links within the text message must be valid formatted URLs.
Text messages must follow the specifications shown in the table below:
Supported format | Size (Maximum) |
---|---|
UTF-8 | 7,000 Characters |
{
"type": "text",
"text": "Hello user, how are you?"
}
Image
Send images to your customers.
Images must follow the specifications shown in the table below:
Supported format | Size (Maximum) |
---|---|
Image size | 8 MB |
Caption | 512 characters (maximum) |
Image format | .jpg, .png, .gif |
Thumbnail size | 400 x 400 px (recommended) |
{
"type": "image",
"originalUrl": "https://news-events.sleeping-out.co.za/wp-content/uploads/2015/11/rock-climbing.jpg",
"previewUrl": "https://timelinethumbnailcreator.com/img/icon-brush-256.png"
}
Video
Send videos that customers can watch inline in Viber.
You must provide the URL to the video. The URL must have a resource with a .mp4 file extension as the last path segment.
Videos must follow the specifications shown in the table below:
Attribute | Specifications |
---|---|
Video size | 26 MB (maximum) |
Video format | .mp4 |
Thumbnail size | 400 x 400 px (recommended) |
Thumbnail format | JPEG |
{
"type": "video",
"url": "https://www.buildquickbots.com/whatsapp/media/sample/video/sample02.mp4",
"previewUrl": "https://i.imgur.com/LMcKBUI.jpeg",
"filename": "AllinoneBotcode"
}
File
Send files, such as documents, to customers.
You must include a file name. Guphup advises including the file extension in the file name since some devices might not be able to recognize the file type without it.
Files must follow the specifications shown in the table below:
Attribute | Specification |
---|---|
File name | 256 characters (maximum), including file extension |
File size | 50 MB (maximum) |
File format | .pdf, .doc, .docx, .ppt, .pptx, .xls, .xlsx |
{
"type": "file",
"url": "https://www.buildquickbots.com/whatsapp/media/sample/excel/sample02.xlsx"
}
Quick reply
{
"type": "quick_reply",
"msgid": "qr0998",
"title": "choose any one of the following",
"content": {
"type": "text",
"text": "What's your favourite color?"
},
"options": [
"Red",
"Green",
"Yellow",
"Blue",
"silver",
"gray",
"black",
"navy",
"blue",
"cerulean",
"sky blue"
]
}
Sticker
Send Viber-supported stickers. Each sticker has an ID. Use this ID to send the sticker.
{
"type": "sticker",
"url": "40124"
}
Contact
Send customers a contact that is saved in your address book. Customers can save this contact on their devices.
Attribute | Specification |
---|---|
Contact's name | max 28 characters |
Contact's phone number | max 18 characters |
Only one phone number per contact can be sent.
{
"type": "contact",
"contact":
{
"addresses": [
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": "94025"
},
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "200 Jefferson Dr",
"type": "WORK",
"zip": "94025"
}
],
"birthday": "2012-08-18",
"emails": [
{
"email": "[email protected]",
"type": "WORK"
},
{
"email": "[email protected]",
"type": "WORK"
}
],
"name":
{
"firstName": "John",
"formattedName": "John Smith",
"lastName": "Smith"
},
"org":
{
"name": "WhatsApp",
"details": "Design"
},
"phones": [
{
"phone": "+1 (940) 555-1234",
"type": "HOME"
}
],
"urls": [
{
"url": "https://www.facebook.com",
"type": "WORK"
}
]
}
}
Location
Send customers a location to help them easily locate their requested place. You require only location coordinates for this message type.
Attribute | Specification |
---|---|
Location coordinates | Latitude (±90°) & longitude (±180°) within valid ranges |
{
"longitude": -122.425332,
"latitude": 37.758056,
"name": "Facebook HQ",
"address": "1 Hacker Way, Menlo Park, CA 94025",
"type": "location"
}
Survey
{
"type": "survey",
"question": "What is your hobby?",
"options": [
"Sleeping",
"Eating",
"Coding"
]
}
Catalogue
{
"type": "catalogue",
"message": "Choose any one of the following Catalogues:",
"tag": "SHIPPING_UPDATE",
"msgid": "gts123",
"items": [
{
"title": "Purple Skies",
"subtitle": "Group Trip of 15",
"imgurl": "https://travel.mqcdn.com/mapquest/travel/wp-content/uploads/2020/06/GettyImages-1211212607.jpg",
"options": [
{
"type": "url",
"title": "View Package Details",
"url": "https://travel.mqcdn.com/mapquest/travel/wp-content/uploads/2020/06/GettyImages-1211212607.jpg"
},
{
"type": "text",
"title": "Buy"
}
]
},
{
"title": "Golden Mountains",
"subtitle": "Group Trip of 10",
"imgurl": "https://i.pinimg.com/originals/cc/18/8c/cc188c604e58cffd36e1d183c7198d21.jpg",
"options": [
{
"type": "url",
"title": "View Package Details",
"url": "https://i.pinimg.com/originals/cc/18/8c/cc188c604e58cffd36e1d183c7198d21.jpg"
},
{
"type": "text",
"title": "Buy"
}
]
}
]
}
Request Contact
{
"type": "request_contact",
"text": "Please share your contact to continue!",
"buttonText": "Share Contact"
}
Updated about 1 year ago