Get chat history

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
string
required
Query Params
string
required

Cursor to page backwards from: nextCursor of the SYNC_EVENT_LOG.META event for the first page, then nextCursor of the previous page. Opaque — pass it back verbatim and do not construct or parse one. "after" is meant in paging order, which here is older in time. An unparsable cursor is a 400 rather than a silent restart at the newest page.

int32
≤ 500
Defaults to 100

Events per page. Omitted returns 100; larger values are clamped to 500. A long chat carries carousel and product payloads on every turn, so prefer several small pages over one large one.

Responses

400

Bad 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.

404

Not Found — unknown agentId, or a chatId that does not belong to it.

429

Too Many Requests — rate limit exceeded. Back off before retrying.

500

Internal Server Error — backend error.

Language
Credentials
Bearer
API token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

© Bloomreach, Inc. All rights reserved.