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
beforeDatequery parameter set to the cursor value (RFC3339 format) - To get newer messages: Pass
afterDatequery 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
- 200
- 400
- 401
- 403
- 500
Successfully retrieved messages
Bad request - Invalid organization ID, thread ID, or query parameters
Unauthorized - Invalid or missing API token
Forbidden - User does not have permission to view this thread
Internal server error