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

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

Response

string
required
ID of the created message.
string
required
ID of the chat the message belongs to.
string
required
The message type, for example whether it originated from the user or the assistant.
string
required
The message text content.
string[]
Optional list of suggested follow-up questions.
object[]
Optional list of recommended products.
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[]