Skip to main content

Starting and resetting

Use this API to start a conversation, whether the channel is starting for the first time or you need to reset the bot's interaction history.

URI​

{{base_url}}/generic/ns/{{namespace}}/bot-provider/{{bot_provider_name}}/message/sse

HTTP method​

POST

Headers​

If you have enabled the API key feature, include X-API-KEY in the header, set to the API key configured in the Asgard console. Without it the connection fails.

NameTypeDescription
X-API-KEYstringYour API key

Request parameters​

NameTypeDescription
customChannelIdstringThe chat channel's id. Required, and yours to choose. Conversation memory is per channel id.
customMessageIdstringThe message id. Set your own or leave it empty; useful for tracing and debugging.
textstringLeave empty when initializing
actionstringMust be RESET_CHANNEL when initializing

Sample payload​

{
"customChannelId": "a-random-channel-id-1",
"customMessageId": "a-random-msg-id-1",
"text": "",
"action": "RESET_CHANNEL"
}

Response​

On success you receive a stream of JSON messages. For the detail of each event:

The events​

Message Template​

The message object's template field carries the render data for the frontend's standard components: