Get Recent Messages
GET {{baseUrl}}/1/messages/:thread_id?count=25&max_created_usec=-51454198&updated_since_usec=-51454198&last_updated_since_usec=-51454198&sorted_by=DESC&sort_by=DESC&message_type=message
Returns a list of the most recent messages for the given thread.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
count | number | Number of messages to return. | |
max_created_usec | number | A UNIX timestamp in microseconds. If given, we return messages created at and before the given timestamp. The messages will be sorted by creation time in descending order if sort_by or sorted_by are not provided. If either updated_since_usec or last_updated_since_usec is provided, this parameter is ignored. | |
updated_since_usec | number | A UNIX timestamp in microseconds. If given, we return messages | |
last updated at and after the given timestamp. The messages will | |||
be sorted by last update time in ascending order if sort_by or | |||
sorted_by are not provided. | |||
last_updated_since_usec | number | A UNIX timestamp in microseconds. If given, we return messages | |
last updated before the given timestamp. The messages will | |||
be sorted by last update time in ascending order if sort_by or | |||
sorted_by are not provided. | |||
sorted_by | string | Determines whether to sort messages in ascending or descending | |
order. | |||
sort_by | string | Alias for sorted_by . | |
message_type | string | Determines the type of messages to return. If edit , document edit messages will be returned. Otherwise, regular messages will be returned. |
RESPONSES
status: OK
[{"id":"FCKADA33rNg","author_id":"UTUAEAiZl6B","created_usec":1632348632519081,"updated_usec":1632348632596233,"visible":true,"author_name":"Jane Doe","text":"officia sint cupidatat","files":[{"hash":"vOTFW_A3Cp1zXNSjqsEIoA","name":"hello.txt"}],"annotation":{"id":"ipsum dolore","highlighted_section_ids":["pariatur i","qui culpa "]},"parts":[["system","HTML1"],["status","HTML2"]],"apparent_user":{"user_id":"te"},"diff_groups":[{"diffs":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},{"diffs":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]}],"like_user_ids":["minim aute officia","qui sed ex reprehenderit"],"mention_user_ids":["anim","amet in pariatur"]},{"id":"FCKADA33rNg","author_id":"UTUAEAiZl6B","created_usec":1632348632519081,"updated_usec":1632348632596233,"visible":true,"author_name":"Jane Doe","text":"labore voluptate deserunt velit","files":[{"hash":"vOTFW_A3Cp1zXNSjqsEIoA","name":"hello.txt"}],"annotation":{"id":"dolore","highlighted_section_ids":["Duis tempor Lorem et","eiusmod ea deserunt"]},"parts":[["system","HTML1"],["status","HTML2"]],"apparent_user":{"user_id":"occaecat ut irure esse"},"diff_groups":[{"diffs":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]},{"diffs":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}]}],"like_user_ids":["dolore velit fugiat adipisicing reprehenderit","do culpa cillum mollit"],"mention_user_ids":["magna eu","do"]}]