Export session transcript
Sessions
Export session transcript
Stream a session’s full event transcript as newline-delimited JSON.
POST
Export session transcript
Restrictions
Usage
- Personal sessions are exportable only by their creator; team sessions can be exported by same-account callers with the
session_id. - The response is
application/x-ndjson— parse line-by-line and write to a file; do not buffer the whole body in memory. - The first line is always a
session_metaenvelope;include_subagents=trueinlines each child session’s stream after its dispatch line. - Requests are capped at a 60-second execution timeout; very large sessions may not finish exporting within that window.
- If the stream fails partway through, the response ends with a JSON error line instead of a proper error envelope (headers are already sent) — check for this trailing line to detect truncation.
Authorizations
App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.
Body
application/json
Response
Streaming NDJSON (application/x-ndjson). One JSON object per line, terminated by a newline. The first line is always a session_meta envelope; subsequent lines are session events.
Newline-delimited JSON stream. Parse line-by-line; do not buffer the whole body.