Skip to main content

List messages in a thread

GET 

/api/v1/orgs/:orgID/threads/:threadID/messages

Retrieve messages from a conversation thread with pagination support.

Pagination: Messages are returned in ascending chronological order (oldest first). Use the cursor from the metadata for pagination:

  • To get older messages: Pass beforeDate query parameter set to the cursor value (RFC3339 format)
  • To get newer messages: Pass afterDate query parameter set to the cursor value (RFC3339 format)

Content Structure: The content field is a JSON object that contains the message data. For text messages, it will have a text field with the message content. For deleted messages, the content will be an empty object {}.

Sender Types:

  • user - Message sent by a user
  • system - System-generated message (senderName will be "System")

Deleted Messages: Deleted messages are included in the response with deletedAt set and content as an empty object {}. This allows clients to detect deleted messages and update their UI accordingly.

Request

Responses

Successfully retrieved messages