Skip to main content
POST
Add Message to Chat
Add a user message to a chat. The assistant processes the message and returns a reply, which may include follow-up suggestions and product recommendations.

Authentication

This request requires your API key in the x-api-key header.

Request

chatId
string
required
ID of the chat to add the message to.
store
string
Optional query parameter.
message
string
required
The user’s message text.
currentUrl
string
required
The URL of the page the user is currently viewing. Used to give the assistant page context.

Response

id
string
required
ID of the created message.
chatId
string
required
ID of the chat the message belongs to.
type
string
required
The message type, for example whether it originated from the user or the assistant.
content
string
required
The message text content.
suggestions
string[]
Optional list of suggested follow-up questions.
products
object[]
Optional list of recommended products.
createdAt
string
required
ISO 8601 timestamp of when the message was created.
To receive the assistant’s streamed response and tool activity in real time, open the Message Events stream for the same chatId.

Examples

Success response

Error response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chatId
string
required

Query Parameters

store
string

Body

application/json
message
string
required
currentUrl
string
required

Response

201 - application/json
id
string
required
chatId
string
required
type
string
required
content
string
required
createdAt
string
required
suggestions
string[]
products
object[]