Inbound message
Forwarding customer messages to Medallia Conversations.
Inbound messages are POST requests sent by the adapter to forward messages from the respondent to Medallia Conversations.
Request URL
{conversations-api-gateway-host}/apis/v0/channels/{channel-guid}/messagesWhere
- conversations-api-gateway-host: the Medallia Experience Cloud hostname to access the Medallia Conversations API gateway.
- channel-guid: the ID of the Custom Channel assigned in Medallia Conversations.
Request headers
accept: text/plain
authorization: Bearer 12345
content-type: application/jsonFor information about the authorization header, see Adapter authentication.
Request payload
The inbound message is in the message element which has the message text and the message ID generated by the adapter/channel service. Note page ID the recipient:id of each message must match the entry:id.
{
"object":"page",
"entry": [{
"id": "<PAGE_ID>",
"time": "<UNIX_TIMESTAMP>"
"messaging": [{
"sender": { "id": "<CUSTOMER_ID>" },
"recipient": { "id": "<PAGE_ID>" },
"message": {
"mid": "<MESSAGE_ID>",
"text": "<MESSAGE>",
}
}]
}]
}
Request parameters
object string required | Always "page". |
entry array required | One or more sets of messages (an "entry") targeted to a single channel (a "page"). |
entry:id string or integer required | Page ID of the Medallia Conversations Channel — as defined in its Authentication settings — that identifies the unique adapter instance associated with the channel. This value must match the recipient:id for the inbound messages. |
time integer | Unix epoch timestamp of the last event associated with the element. For example, when it was a multi-part message, this is the time of the last message-part. |
messaging array required | One or more message objects. |
sender:id string or integer required | Identifier unique to the respondent, such as phone number, email, or other channel-specific value. For phone numbers, the ID must be in E.164 format. |
recipient:id string or integer required | Page ID of the Medallia Conversations Channel — as defined in its Authentication settings — that identifies the unique adapter instance associated with the channel. This value must match the recipient:id for the inbound messages. |
mid string | An identifier of the message. Created and used by the adapter/channel service to track the message. |
text string required | Text message no longer than 1,600 characters. The channel service may split the message into multiple messaging objects for delivery. |
Example: curl request
curl --request POST \
--url https://conversations.sc4.medallia.com/apis/v0/channels/channel-guid/messages \
--header 'accept: text/plain' \
--header 'authorization: Bearer 12345' \
--header 'content-type: application/json' \
--d '{
"object":"page",
"entry": [{
"id": "page_id",
"time": 1770163786,
"messaging": [{
"sender": { "id": "customer_id" },
"recipient": { "id": "page_id" },
"message": {
"mid": [ "msg_id_1" ],
"text": "Hello"
}
}],
}]
}'Response
| Response | Description |
|---|---|
| 200 | The request was processed as expected. |
| 401 | Unauthorized. The reason is provided in a human-readable string. |
| 403 | Forbidden.
|
| 500 | Internal server error.
|
