Receive messages webhook can be passed in status_callback parameter in send message/template message APIs to receive replies on messages from the business. To receive any message from an end user which is not a reply to a business message, a default callback value needs to be configured. Exotel team will help you configure the default URL while onboarding.
*NOTE: Any messages from an user can be received only in one webhook at any time
|
Parameter |
Type |
Mandatory |
Notes |
|
rcs |
MessageICMObject |
Mandatory |
Incoming message callback for RCS |
|
Parameter |
Type |
Mandatory |
Notes |
|
messages |
[]RCSMessageICMObject |
Mandatory |
Information relating to the incoming messages from the end-users |
|
Parameter |
Type |
Mandatory |
Notes |
|
callback_type |
String |
Mandatory |
Type of the callback. Possible values: dlr/icm |
|
sid |
String |
Mandatory |
Unique identifier of the incoming message |
|
from |
String |
Mandatory |
Number of the end user who has sent the incoming message to the business |
|
to |
String |
Mandatory |
Business number to whom the message was sent |
|
timestamp |
String |
Mandatory |
Timestamp at which incoming message was sent |
|
content |
ContentObject |
Mandatory |
Content related to the incoming message |
|
Parameter |
Type |
Mandatory |
Notes |
|
type |
String |
Mandatory |
Type of the message |
|
text |
String |
Optional |
Mandatory if type is text |
|
file |
FileIncomingMessageObject |
Optional |
Mandatory if type is file |
|
location |
LocationIncomingMessageObject |
Optional |
Mandatory if type is location |
|
Suggested |
SuggestedIncomingMessageObject |
Optional |
Mandatory if type is suggested |
|
error |
MessageICMErrorObject |
Optional |
If there is an error |
|
Parameter |
Type |
Mandatory |
Notes |
|
url |
String |
Mandatory |
URL to download the media |
|
name |
String |
Optional |
This is passed if the media is document. Describes the filename for the specific document. |
|
type |
String |
Mandatory |
Type of the file |
|
size |
Integer |
Mandatory |
Size of the file |
|
thumbnail_url |
String |
Optional |
URL of the thumbnail |
|
thumbnail_type |
String |
Optional |
Type of the thumbnail |
|
thumbnail_size |
Integer |
Optional |
Size of the thumbnail |
|
Parameter |
Type |
Mandatory |
Notes |
|
latitude |
Float |
Mandatory |
Latitude of the location |
|
longitude |
Float |
Mandatory |
Longitude of the location |
|
Parameter |
Type |
Mandatory |
Notes |
|
Response |
SuggestedResponseIncomingMessageObject |
Mandatory |
Response for suggested for reply/action |
|
Parameter |
Type |
Mandatory |
Notes |
|
Reply |
ReplyObject |
Mandatory |
Suggested Reply |
|
Action |
ActionObject |
Mandatory |
Suggested Action |
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "1234",
"from": "5678",
"to": "9012",
"timestamp": "2024-12-07T17:00:00.000+05:30",
"content": {
"type": "text",
"text": "This is a text message from RCS"
}
}
]
}
}
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "1234",
"from": "5678",
"to": "9012",
"timestamp": "2024-12-07T17:00:00.000+05:30",
"content": {
"type": "file",
"file": {
"url": "https://rcs-user-content-ap.storage.googleapis.com/040ee868-9e0c-4a3a-b24b-c559987dfeb7/725738ceec470d8574c0050c497d8bfc6a76e78e405e8b99438b3b23d764",
"name": "xyz.jpg",
"type": "image/jpeg",
"size": 187662,
"thumbnail_url": "https://rcs-user-content-ap.storage.googleapis.com/040ee868-9e0c-4a3a-b24b-c559987dfeb7/df6dccf930b934682505128f9c54e14dade8603bc5384a6a8e846496c8bc",
"thumbnail_type": "image/jpeg",
"thumbnail_size": 7534
}
}
}
]
}
}
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "1234",
"from": "5678",
"to": "9012",
"timestamp": "2024-12-07T17:00:00.000+05:30",
"content": {
"type": "location",
"location": {
"longtitude": 74.3043942,
"latitude": 29.6305248
}
}
}
]
}
}
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "1234",
"from": "5678",
"to": "9012",
"timestamp": "2024-12-07T17:00:00.000+05:30",
"content": {
"type": "suggested",
"suggested": {
"response": {
"action": {
"postback": {
"data": "set_by_chatbot_open_url"
},
"text": "Show now"
}
}
}
}
}
]
}
}
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"sid": "1234",
"from": "5678",
"to": "9012",
"timestamp": "2024-12-07T17:00:00.000+05:30",
"content": {
"type": "suggested",
"suggested": {
"response": {
"reply": {
"text": "Know more",
"postback": {
"data": "user_query"
}
}
}
}
}
}
]
}
}
{
"rcs": {
"messages": [
{
"callback_type": "incoming_message",
"from": "1234",
"profile_name": "John",
"to": "5698",
"timestamp": "1235654654",
"content": {
"error": {
"exo_status_code": 24501,
"exo_detailed_status": "EX_UNSUPPORTED_MEDIA_TYPE",
"description": "The media type is currently not supported"
}
}
}
]
}
}