Export Chat Sessions
Returns chat sessions with their transcripts and tool calls, oldest first, as JSON or as Markdown ready to hand to Claude Code, claude.ai, a Codex agent or an MCP client.
Enabled per account. Ask Osvi support to turn it on; until then every call returns 403 feature_disabled.
Limits. With no dates the export covers the last 24 hours, and one request covers at most 31 days. A window serves at most 1,000 sessions, 25 per page. Each token may make 10 requests a minute and 1,000 a day, and an account may run 2 exports at once. Every 429 carries a Retry-After header.
format=markdown to get one readable timeline per conversation, ready to hand to an LLM.
403 feature_disabled.Use it with Claude Code
Reading every page
Each response tells you exactly how to ask for the next one:- JSON: send the parameters in
meta.next_pageas they are. It isnullon the last page. - Markdown: the
X-Next-Pageheader 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
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
*_truncated flag is true, so you never mistake a cut-off record for a complete one.
What’s in a tool call
type: "interaction".Authorizations
16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.
Query Parameters
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 of the window, same formats. Defaults to now. The window may span at most 31 days.
Page number. Follow meta.next_page rather than counting pages yourself.
Sessions per page (max 25).
x <= 25json, or markdown for one readable timeline per session. The .md path suffix works too.
json, markdown Only sessions with these statuses. Accepts a comma-separated list.
Only sessions in this mode. support means an operator has taken over.
ai, support Only sessions handled by this chat agent. Returns 404 if the agent is not on your account.
Only one customer's sessions.
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.
