Build the Request

After the session is established, your bot can receive subsequent chat messages from the customer or client with the unique sessionId. For the service client to continue sending messages in an active chat session, the client sends requests with this endpoint. The <HOST_URL> is the Runtime Base URL field found in the Add Connection dialog when you add the connected app to the bot (see Prerequisites).

This example shows you how to send a subsequent message in a bot session with this endpoint. Here the host URL is https://runtime-api-na-west.stg.chatbots.sfdc.sh.

The required path parameter is:

  • SESSION_ID: Required. The sessionId returned by the bot when you start a session.

The required request headers are described in Begin a Session.

YOUR_REQUEST_BODY.json is the request body or payload in JSON format with a message object containing the message from the customer or client. The schema as shown in the API references of the message object depends on what message type it is: