To properly select your message type, you should first identify the format that best suits your needs. Subsequently, you can choose from different types of messages and fill in your body type params.
Before sending messages, you must select your message type from a large number of formats to take the most accurate option for your goal. It can be text, audio, an image, etc.
1. Text
A text message type is a message that is sent as plain text.
Argument
Description
Required
text
This field will store the message to be sent to the client.
Yes
Sample API request
# Send a text message to a specific user.curl-X"POST""https://api.jelou.ai/v1/whatsapp/messages" \-H'Content-Type: application/json' \-u'<clientId>:<clientSecret>' \-d$'{ "text": "<message>", "userId": "<userId>", "botId": "<botId>", "type": "text"}'
A audio message type is a message that is sent as an audio.
Argument
Description
Requires
mediaUrl
This field will store the file URL to be sent in the message
Yes
Sample API request
## Send Audio# send a text message to a specific user.curl-X"POST""https://api.jelou.ai/v1/whatsapp/messages" \-H'Content-Type: application/json' \-u'<clientId>:<clientSecret>' \-d$'{ "mediaUrl": "<mediaUrl>", "userId": "<userId>", "botId": "<botId>", "type": "audio"}'
A video message type is a message that is sent as an video.
Argument
Description
Required
mediaUrl
This field will store the file URL to be sent in the message
Yes
text
This field will store the message that goes next to the video.
No
Sample API request
## Send Video# Send a video to a specific user.curl-X"POST""https://api.jelou.ai/v1/whatsapp/messages" \-H'Content-Type: application/json' \-u'clientId:clientSecret' \-d$'{ "mediaUrl": "<mediaUrl>", "text": "<message>", "userId": "<userId>", "botId": "<botId>", "type": "video"}'
6. File
A file message type is a message that is sent with a file and text.
Argument
Description
Required
mediaUrl
This field will store the file URL to be sent in the message
Yes
text
This field will store the message that goes next to the image.
No
Sample API request
## Send File# Send a file to a specific user.curl-X"POST""https://api.jelou.ai/v1/whatsapp/messages" \-H'Content-Type: application/json' \-u'clientId:clientSecret' \-d$'{ "mediaUrl": "<mediaUrl>", "userId": "<userId>", "botId": "<botId>", "type": "file"}'
A quick_reply message type to offer a quicker way for users to make a selection from a menu when interacting with a business
Argument
Description
Required
text
This field store the message to be sent to the client.
Yes
title
This field stores the text of the title of the message.
No
quick_replies
This field stores quick replies buttons.
Yes
quick_replies.*.title
This field stores the text of the quick reply button.
Yes
quick_replies -> Minimum of 1 and maximum of 3 buttons.
title -> Optional. Maximum length: 20 characters.
quick_replies.*.title -> It cannot be an empty string and it must be unique within the message. Maximum of 20 characters. Does not allow emojis or markdowns.
Sample API request
## Send Quick Reply# Send a Quick reply message to a specific user.curl-X"POST""https://api.jelou.ai/v1/whatsapp/messages" \-H'Content-Type: application/json' \-u'<clientId>:<clientSecret>' \-d$'{ "text": "<message>", "title": "<Title of message>", "quick_replies": [ { "title": "<BUTTON_TITLE_1>" }, { "title": "<BUTTON_TITLE_2>" }, { "title": "<BUTTON_TITLE_3>" } ], "userId": "<userId>", "botId": "<botId>", "type": "quick_reply"}'