Messages
The messages in a conversation, and the endpoint that runs the model.
List messages
Returns the messages in one thread, oldest first. The thread is the collection — it comes from the path, so a message can never be read through a thread it does not belong to.
path Parameters
idquery Parameters
cursor^[A-Za-z0-9_-]+$limitmsg_activemsg_createdmsg_idmsg_modelmsg_senderoffsetsort^-?[a-z0-9_]+$Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List messages › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
Send a message
Posts to the thread and starts the assistant's reply. This is the endpoint that runs a model, so it consumes credits and is counted against the expensive rate-limit tier.
The reply is produced asynchronously — follow the thread's event stream rather than waiting on this response for it.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Send a message › Request Body
thread_agentthread_refmsg_modelmsg_activeresponseMessageIdattach_logoretryimageQualityaspectRatiodesign_templateSend a message › Responses
Success
msg_idmsg_threadmsg_parentmsg_sequencemsg_rolemsg_contentmsg_sendermsg_modelmsg_metadatamsg_errormsg_feedbackmsg_formmsg_versionmsg_edited_atmsg_tool_callsmsg_tool_call_idmsg_createdmsg_activeGet a message
Returns one message with its content, its sender and what the model spent on it.
path Parameters
idmessage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a message › Responses
Success
msg_idmsg_threadmsg_parentmsg_sequencemsg_rolemsg_contentmsg_sendermsg_modelmsg_metadatamsg_errormsg_feedbackmsg_formmsg_versionmsg_edited_atmsg_tool_callsmsg_tool_call_idmsg_createdmsg_activeEdit a message
Rewrites the text of a message already sent. It does not re-run the model — discard the exchange for that.
path Parameters
idmessage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Edit a message › Responses
Success
Undo an exchange
Removes this message, the user message that prompted it, and everything after it in the thread — rewinding the conversation to before the exchange. Used to back out an edit that went wrong.
path Parameters
idmessage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Undo an exchange › Responses
Success
Rate a message
Records a thumbs up or down against an assistant reply.
path Parameters
idmessage_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Rate a message › Responses
Success
