> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vern.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream the thread (SSE)

> A Server-Sent Events stream of the same thread events. Each message is `event: <type>` + `data: <json>`. The stream ends with `event: done` and closes after ~5 minutes; reconnect with `?after=<last_sequence>` to continue.



## OpenAPI

````yaml /api-reference/openapi.json get /migrations/{migration_id}/thread/stream
openapi: 3.1.0
info:
  title: Vern Migration API
  version: 1.0.0
  description: >-
    Run Vern as a headless migration engine. Create a migration, upload a
    customer's files, run the managed agent to generate a preview, then execute
    and export clean data. See the Migration API guides for concepts and
    walkthroughs.
servers:
  - url: https://app.vern.so/api/v1
security:
  - apiKey: []
tags:
  - name: Catalog
    description: Discover the sources and templates you set up in the Vern UI.
  - name: Migrations
    description: Create a migration workspace and upload a customer's files.
  - name: Runs
    description: 'Drive the managed agent: generate, refine, execute, answer, and observe.'
  - name: Export
    description: Download a migration's validated data as CSV.
paths:
  /migrations/{migration_id}/thread/stream:
    parameters:
      - $ref: '#/components/parameters/MigrationId'
    get:
      tags:
        - Runs
      summary: Stream the thread (SSE)
      description: >-
        A Server-Sent Events stream of the same thread events. Each message is
        `event: <type>` + `data: <json>`. The stream ends with `event: done` and
        closes after ~5 minutes; reconnect with `?after=<last_sequence>` to
        continue.
      operationId: streamThread
      parameters:
        - name: after
          in: query
          required: false
          schema:
            type: integer
        - name: include
          in: query
          required: false
          schema:
            type: string
            enum:
              - user
              - tools
              - all
            default: user
      responses:
        '200':
          description: An SSE stream.
          content:
            text/event-stream:
              schema:
                type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    MigrationId:
      name: migration_id
      in: path
      required: true
      description: The migration ID returned by Create a migration.
      schema:
        type: string
        format: uuid
      example: c0a8012e-4f1b-4d3a-9b2c-7e6f5a4b3c2d
  responses:
    Unauthorized:
      description: API key missing, malformed, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The referenced resource isn't in your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable error message.
      required:
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Vern API key. Create one at Settings → API keys.

````