Skip to main content

GetThreadHistory

Returns message history for a given thread in a certain direction.

Defaults to querying messages before ts.

Path Parameters
  • thread_id string required

    Possible values: Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

    A universally unique identifier.

Query Parameters
  • ts date-time

    RFC3339 timestamp.

  • count int32 required

    How many messages to collect in each direction.

    If querying rivet.api.chat.common#QueryDirection$before_and_after, rivet.api.chat.common#QueryDirection$chat_messages will be count * 2.

  • query_direction string

    Possible values: [before, after, before_and_after]

    Represents which direction to query messages from relative to the given timestamp.

Responses

GetThreadHistory 200 response

Schema
  • chat_messages object[] required

    Ordered old to new.

    If querying rivet.api.chat.common#before_and_after, this will be count * 2 long.

    • chat_message_id string required

      Possible values: Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

      A universally unique identifier.

    • thread_id string required

      Possible values: Value must match regular expression ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

      A universally unique identifier.

    • send_ts date-time required

      RFC3339 timestamp.

    • body required

      Represents types of chat message bodies.