Skip to main content
GET
Export chat sessions
Pull your chat conversations, with every tool call the agent made, into Claude Code, claude.ai, a Codex agent or your own MCP client. Ask for JSON to process the data, or format=markdown to get one readable timeline per conversation, ready to hand to an LLM.
The export is enabled per account. Ask Osvi support to turn it on. Until then, every call returns 403 feature_disabled.

Use it with Claude Code

With no dates, the export covers the last 24 hours. On claude.ai, attach the same file to a chat.

Reading every page

Each response tells you exactly how to ask for the next one:
  • JSON: send the parameters in meta.next_page as they are. It is null on the last page.
  • Markdown: the X-Next-Page header holds the next page’s query string, and the last line of the document repeats it.
next_page fixes the window to the timestamps page 1 used (meta.range). A window like “the last 24 hours” would otherwise move between requests and skip conversations. For the same reason, a request for page 2 or later without both start_date and end_date is rejected with range_required. If you filter by status or mode, next_page also carries a snapshot_token. It keeps page boundaries stable while conversations close or change hands during your export.

Limits

Every 429 carries a Retry-After header with the number of seconds to wait. Most HTTP clients and agent tools follow it automatically. Each conversation is bounded so one very long chat can’t crowd out the rest of the page:
  • Transcript: 500 messages and 30,000 characters
  • Tool calls: 500 events and 30,000 characters, counting tool names and IDs. Arguments over 4,000 characters are left out, outputs are cut at 8,000, and error messages at 2,000
  • Input and state fields: 30,000 characters each
When a bound applies, the matching *_truncated flag is true, so you never mistake a cut-off record for a complete one.

What’s in a tool call

Knowledge-base lookups and the internal events behind buttons, carousels and date pickers are not listed as tool calls. Interactive prompts and replies show up in the transcript with type: "interaction".

Authorizations

API-Token
string
header
required

16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.

Query Parameters

start_date
string

Start of the window. A date (2026-10-09, the whole day in IST) or an ISO 8601 timestamp. Defaults to 24 hours before end_date. Required, with end_date, on pages after the first: copy both from meta.next_page.

end_date
string

End of the window, same formats. Defaults to now. The window may span at most 31 days.

page
integer
default:1

Page number. Follow meta.next_page rather than counting pages yourself.

per_page
integer
default:10

Sessions per page (max 25).

Required range: x <= 25
format
enum<string>
default:json

json, or markdown for one readable timeline per session. The .md path suffix works too.

Available options:
json,
markdown
status
string

Only sessions with these statuses. Accepts a comma-separated list.

mode
enum<string>

Only sessions in this mode. support means an operator has taken over.

Available options:
ai,
support
agent_uuid
string

Only sessions handled by this chat agent. Returns 404 if the agent is not on your account.

customer_id
string

Only one customer's sessions.

snapshot_token
string

Keeps page boundaries stable while sessions change status or mode. Comes back in meta when status or mode is filtered, and is already included in meta.next_page.

Response

One page of sessions. In Markdown, pagination comes back in the X-Total-Count, X-Current-Page, X-Total-Pages, X-Per-Page, X-Records-Cap, X-Capped, X-Range-Start, X-Range-End, X-Next-Page (a query string) and X-Snapshot-Token headers.

success
boolean
Example:

true

data
object[]
meta
object