Skip to main content
POST
Export session transcript

Restrictions

Usage

  • 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_meta envelope; include_subagents=true inlines each child session’s stream after its dispatch line.

Authorizations

app_key
string
query
required

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

Export the full event transcript of one session as a streaming NDJSON body.

session_id
string
required

Target session ID.

include_subagents
boolean

When true, each subagent_dispatch line is followed by the child session's full event stream, bracketed by its own session_meta. Defaults to false.

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.