Sending Message
Authentication
Send this title with every request.
json
{
"Authorization": "Bearer ${token}"
}🔒 Sending Message to Customer
You can send a message to your customer using the following information.
POST
/api/company/send-message
Body
json
{
"context": {
// ...
},
"type": "",
"chat_id": "905555555555",
"channel_id": "905550000000"
}Parameter Description
| Name | Description |
|---|---|
| context | Json information of the message to be sent. (Whatsapp/Instagram/Facebook data is different). 1. Whatsapp 2. Instagram 3. Facebook |
| type | Type of message to be sent 1. TEXT 2. IMAGE_URL 3. VIDEO_URL 4. VOICE_URL 5. LIST (WHATSAPP) 6. BUTTON (WHATSAPP) 7. INSTAGRAM_GENERIC_BUTTON 8. FACEBOOK_GENERIC_BUTTON 9. WHATSAPP_LOCATION 10. WHATSAPP_LOCATION_REQUEST 11. FILE_URL |
| chat_id | Customer number/id |
| channel_id | Channel number/id of the message to be sent to the customer |
Response
json
{
"response": {
"message_id": "aWdfZAG1faXRlbToxO..."
}
}🔒 Reply Answer to Message
You can send a message to your customer using the following information.
POST
/api/company/send-reply-message
Body
json
{
"context": {
"text": "Hello, this is a reply message."
},
"type": "TEXT", // Only TEXT is allowed for reply message
"chat_id": "905555555555",
"channel_id": "905550000000",
"message_id": "aWdfZAG1faXRlbToxO..." // Message ID of the message to be replied
}Parameter Description
| Name | Description |
|---|---|
| context | Json information of the message to be sent. Only the text field is supported for reply messages. |
| type | Type of message to be sent. Only TEXT is allowed for reply messages. |
| chat_id | Customer number/id |
| channel_id | Channel number/id of the message to be sent to the customer |
| message_id | Message ID of the message to be replied |
Response
json
{
"response": {
"message_id": "aWdfZAG1faXRlbToxO..."
}
}