Inbound Message
IMPORTANT!
An "X-Secret-Key" will be provided on the request HTTP Header. It can be used to verify if the request is valid.
Below we will describe the details of the payload that will be sent to the chatbot whenever receiving a new message from a user.
Payload Fields
Field | Type | Description |
---|---|---|
caseID | string | The case ID of the message. |
message | object | Defines the details of the inbound message. |
id | string | The message ID. |
type | string | The message type. |
text | object | Defines the details for "text" message type. |
body | string | The body of the "text" message type. |
document | object | Defines the details for "document" message type. |
url | string | The URL of the document. |
filename | string | The filename of the document. |
caption | string | The caption of the "document" type message. |
image | object | Defines the details for "image" message type. |
url | string | The URL of the image. |
caption | string | The caption of the "image" message type. |
video | object | Defines the details for "video" message type. |
url | string | The URL of the video. |
caption | string | The caption of the "video" message type. |
location | object | Defines the details for "location" message type. |
latitude | float | The latitude point of the location. |
longitude | float | The longitude point of the location. |
address | string | The address string of the location. |
name | string | The name of the location. |
Text Message
Document Message
Image Message
Video Message
Location Message
{
"caseID": "52CAA0DE6E",
"message": {
"id": "8622",
"type": "text",
"text": {
"body": "Hello, this is a text message!"
}
}
}
{
"caseID": "52CAA0DE6E",
"message": {
"id": "8622",
"type": "document",
"document": {
"url": "https://myfileurl.com/file1.docx",
"filename": "file1",
"caption": "This is an example file"
}
}
}
{
"caseID": "52CAA0DE6E",
"message": {
"id": "8622"
"type": "image",
"image": {
"url": "https://myfileurl.com/image1.jpg",
"caption": "Look at this view!"
}
}
}
{
"caseID": "52CAA0DE6E",
"message": {
"id": "8622",
"type": "video",
"video": {
"url": "https://myfileurl.com/video1.mp4",
"caption": "A cute cat video :)"
}
}
}
{
"caseID": "52CAA0DE6E",
"message": {
"id": "8622",
"type": "location",
"location": {
"latitude": "-6.1973721",
"longitude": "106.7618202",
"address": "Business Park Kebon Jeruk blok C2-3...",
"name": "TapTalk.io"
}
}
}
Last modified 4mo ago