Get the chat history (the transcript) of one chat: the older messages and events that came before the ones the client already has. Each response is one page of the transcript, with the oldest event first, so call it again with the returned cursor to keep going back in time.
The chat history always starts from a point the client already holds, so after is required. The newest part of the transcript is not fetched here: it arrives as SYNC_EVENT_LOG on the send-event stream, and the SYNC_EVENT_LOG.META event at the start of that response contains the cursor for the first page.
To decide whether to keep paging, check hasMore and use nextCursor for the next request. Do not rely on the number of events returned: a page can have fewer events than limit, or none at all, while older history is still available, because some events are filtered out after the page is selected.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Bad Request — after is missing or is not a cursor this API issued. Re-sync with SYNC_EVENT_LOG to obtain a fresh one rather than retrying with the same value.
404Not Found — unknown agentId, or a chatId that does not belong to it.
429Too Many Requests — rate limit exceeded. Back off before retrying.
500Internal Server Error — backend error.

