Send a visitor message and get the reply (public)
Called by the chat widget for every message the visitor types. Needs the public chat token in ?token=, the Origin header and X-Conversation-Token. Works like POST /conversations/{id}/messages: the same assistant, the same checks, and with Accept: text/event-stream the same Server-Sent Events (delta, then done or error). Limits: 2000 characters per message, 30 turns per conversation, 6 messages per minute per conversation and 20 per minute per IP address. In live mode, every reply is billed per use from your prepaid balance and counts toward the public chat's daily spending limit (counted at a safe 3 cents a reply); beyond that limit, the request returns public_chat_limit_reached.
Request
- Base URL: https://api.hypamoon.com/api/v1
- URL: https://api.hypamoon.com/api/v1/public/conversations/{id}/messages
- Auth: API key in query parameter token
Path parameters
The id of the conversation.
Headers
The conversation_token from POST /public/conversations. Only the visitor who started the conversation has it.
text/event-stream streams the reply as Server-Sent Events; anything else returns a single JSON response.
Request body
Response
The visitor's message and the assistant's reply.
Changes
No recorded changes to this operation across all 1 revision of this API.