Ask Rosie something
POST
/public/assistant/sessions/{id}/messages
const url = 'https://example.com/public/assistant/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"text":"example","page":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/public/assistant/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "text": "example", "page": "example" }'Answers as server-sent events, each a JSON data: line: delta text, then sources, then at most one interestDraft, then done; or error, which ends the stream. Up to 500 characters, 20 messages a session. Past the day’s spend, or when the model cannot answer, the answer is a fixed reply with guide links and done.fallback is true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
text
required
string
page
string
Example generated
{ "text": "example", "page": "example"}Responses
Section titled “Responses”The answer as server-sent events
Media typetext/event-stream
string
Missing, wrong or expired session token
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Rosie is not set up here
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Rosie is still answering the last message
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}The conversation has ended
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Message limit reached
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}