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.

Inbound messages are from the respondent to Conversations

Request URL

{conversations-api-gateway-host}/apis/v0/channels/{channel-guid}/messages

Where

  • 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/json

For 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 requiredAlways "page".
entry array requiredOne or more sets of messages (an "entry") targeted to a single channel (a "page").
entry:id string or integer requiredPage 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 integerUnix 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 requiredOne or more message objects.
sender:id string or integer requiredIdentifier 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 requiredPage 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 stringAn identifier of the message. Created and used by the adapter/channel service to track the message.
text string requiredText 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

ResponseDescription
200The request was processed as expected.
401Unauthorized. The reason is provided in a human-readable string.
403Forbidden.
  • statusCode: The HTTP status code.

  • error: The error code.

  • message: The error message.

500

Internal server error.

  • statusCode: The HTTP status code.

  • error: The error code.

  • message: The error message.