Reasons

List a Reason's messages

Changed on

Returns the Reason's conversation in order, as listSessionConversation returns its conversation Session's: the opening prompt, each message sent to it, and one reply for every finished turn, failed or cancelled turns included, with kind telling them apart. The page is empty, with session_id null, until the conversation is opened by its first message. Cursor-paginated: pass end_cursor as after, and keep polling with it to receive the Reason's next reply. Readable by the Reason's owner and the people it is shared with.

<sub>Scope: sessions:read</sub>

get/v3/organizations/{orgId}/reasons/{reasonId}/messages

Request

  • Base URL
    https://api.reasonmachines.com
  • URL
    https://api.reasonmachines.com/v3/organizations/{orgId}/reasons/{reasonId}/messages
  • Auth
    HTTP bearer

Query parameters

firstinteger

How many conversation items one page holds, up to 200.

afterstring

Cursor from a previous page's end_cursor (or an item's cursor): return only what follows it. Keep polling with the last end_cursor to receive the Reason's next replies.

Response

A page of the Reason's conversation.

has_next_pageboolean required
end_cursorstring nullable required

The cursor of the last item, or the after that was sent when the page is empty; null only when nothing has been read. Keep polling with it after has_next_page is false to receive what is said next.

reason_idstring uuid required

The Reason whose conversation this is.

session_idstring nullable required

The Reason's conversation Session; null, with no items, until its first message opens it.

Changes