Using this request, the consumer can ask to publish text content to an existing conversation.
Request
Publishes events to existing dialog. Events can be:
- text-content
- rich-content (structured content) - for more information about the supported structured content templates please refer to the Structured Content Templates page under 'Guides' in the Developers' Community.
- photo-reference-content
- read-receipts (accept status)
- presence/typing/signal events (chat-state)
Request ID generated by the client. It should be unique per WebSocket session in order to identify the request. This ID will be reflected by the server in the response to the request.
Contains one of the APIs request type names
body
JSON Output
valid
JSON Schema
You can find the json schema definition of this message here: assets/schema/ws/consumerRequests.json
Response
root
Defines that the message is a response
The ID of the request that originated this response
Contains one of the APIs response type names
Response code according to the HTTP status codes standard
body
content and read receipt events get a sequential ID in the conversation.
JSON Output
valid
JSON Schema
You can find the json schema definition of this message here: assets/schema/ms/PublishEventSuccess.json
Signal messages
Signal messages can be used to send and receive siganls (metadata) by Consumer Window and Bot Agents. These messages are a subtype of chat-state events.
Request Example
{
"id": "A3FA",
"type": "ms.PublishEvent",
"body":
{
"dialogId": "__YOUR_CONVERSATION_ID__",
"event":
{
"type": "ChatStateEvent",
"chatState": "SIGNALED"
}
},
"metadata": [
{
"type": "Signal",
"payload": "{\"key1\" : \"value1\",\"key2\" : \"value2\"}"
}
]
}