Deskhero Developer Hub
Back to deskhero.com
Chat bot

Message

Adds a visitor message to an open session identified by ticket_id and session_token, stores it on the chat ticket and answers from the approved FAQs using the conversation so far, returning found=false when the bot cannot answer. When it cannot answer, an AI written fallback_subject and fallback_message are also returned for the handover form; sessions accept 30 messages, messages are capped at 4000 characters and 60 per IP per hour, and the session stops working once it has been turned into a real ticket.

POST /api/{tenant:minlength(2)}/v{version:apiVersion}/chat_bot/message
Authorisation
No authentication needed

Request arguments

Name Type Source
inputDTO_chat_bot_message_inputBody
Request body example

Response

Status
200 (OK)
Type
DTO_chat_bot_response
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest)
Response body example
DTO_chat_bot_message_input
NameTypeReadOnlyDescription
form_keyStringForm key
ticket_idInt32Ticket id
session_tokenStringSession token
messageStringMessage
DTO_chat_bot_response
NameTypeReadOnlyDescription
foundBooleanTrue when the bot found knowledge and produced a reply. False = show the classic form.
replyStringReadOnlyReply
ticket_idInt32The chat session ticket (local id). Set once the first bot reply exists.
session_tokenStringSecret session token. Required on follow-up messages, rating and form promotion.
fallback_messageStringReadOnlyAI-written first-person summary of what the visitor needs (their own language), built from the whole conversation. The widget uses it to pre-fill the classic form's message when the chat falls back to it, so the visitor doesn't have to retype everything. Null when the condense call failed - fall back to the visitor's raw message.
fallback_subjectStringReadOnlyMatching AI-written subject line (visitor's language) for the fallback form.

Generated Aug 4, 2026 18:37