Skip to main content
GET https://app.vern.so/api/v1/migrations/{migration_id}/thread
GET https://app.vern.so/api/v1/migrations/{migration_id}/thread/stream
The agent records every step it takes to a durable thread. A migration’s thread is the union of those events across all its runs (generate, update, clarify, execute), in a stable order — so you can render a live activity feed, a transcript, or just watch progress without tight-polling the run. Read it two ways: a snapshot you page through with a cursor, or a live SSE stream.

Authentication

Requires an x-api-key header. See Authentication.

Query parameters

Both endpoints accept the same parameters:
after
number
Return only events with a sequence greater than this. Pass the previous response’s last_sequence to page forward (snapshot) or resume (stream). Omit to start from the beginning.
include
string
default:"user"
Verbosity:
  • user (default) — prose, status, preview, the agent’s questions, completion, and errors.
  • tools — the above plus tool calls, tool results, and task IDs.
  • all — everything, including the agent’s thinking and internal prepared inputs.

Snapshot

GET https://app.vern.so/api/v1/migrations/{migration_id}/thread
200 OK
{
  "events": [
    {
      "sequence": 1042,
      "type": "status",
      "data": { "message": "Reading your files" },
      "created_at": "2026-06-19T15:32:13.000Z"
    },
    {
      "sequence": 1043,
      "type": "message",
      "data": { "text": "Mapped 4 of 5 columns; one needs your input." },
      "created_at": "2026-06-19T15:32:20.000Z"
    }
  ],
  "last_sequence": 1043
}
events[].sequence
number
The event’s stable cross-run ordinal. Use the response’s last_sequence as the next after.
events[].type
string
The public event type — one of message, thinking, status, tool_call, tool_result, task, request_input, prepared, preview, completed, error. Which types appear depends on include.
events[].data
object
The event payload, kept intact so you can render tool calls, previews, and prompts.
events[].created_at
string
ISO 8601 timestamp.
last_sequence
number | null
The highest sequence in this page — pass it as after to fetch what’s next.

Live stream (SSE)

GET https://app.vern.so/api/v1/migrations/{migration_id}/thread/stream
A Server-Sent Events stream of the same events. Each message is event: <type> + data: <json>:
event: status
data: {"sequence":1042,"type":"status","data":{"message":"Reading your files"},"created_at":"2026-06-19T15:32:13.000Z"}

event: message
data: {"sequence":1043,"type":"message","data":{"text":"Mapped 4 of 5 columns; one needs your input."},"created_at":"2026-06-19T15:32:20.000Z"}

event: done
data: {"last_sequence":1043}
The stream tails new events until the migration has no active run and the backlog is drained, then sends a final event: done carrying the last sequence. It also closes after a time budget (~5 minutes) — when it does, reconnect with ?after=<last_sequence> to continue exactly where you left off. Watch for an event: error message, which signals a stream-side error before close.
curl -N "https://app.vern.so/api/v1/migrations/c0a8012e-.../thread/stream?include=tools" \
  -H "x-api-key: $VERN_API_KEY"

Errors

StatusMeaning
401API key missing or invalid.
404The migration isn’t in your account.
429Rate limit hit — back off and retry.
500Server error.

Next