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

# Stream pinned-run workflow history events via Server-Sent Events

> Same as /workflow/{id}/history/stream but targets a specific run ID.



## OpenAPI

````yaml /openapi.json get /workflow/{id}/runs/{rid}/history/stream
openapi: 3.0.0
info:
  title: Output.ai API
  version: 1.0.0
  description: API for managing and executing Output.ai workflows
servers:
  - url: http://localhost:3001
    description: Development server
security: []
tags: []
paths:
  /workflow/{id}/runs/{rid}/history/stream:
    get:
      summary: Stream pinned-run workflow history events via Server-Sent Events
      description: Same as /workflow/{id}/history/stream but targets a specific run ID.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The workflow execution ID
        - in: path
          name: rid
          required: true
          schema:
            type: string
            format: uuid
          description: The specific run ID to target
        - in: query
          name: includePayloads
          schema:
            type: boolean
            default: false
          description: Include decoded input/output payloads in events
        - in: query
          name: lastEventId
          schema:
            type: integer
          description: Resume from this event ID (alternative to Last-Event-ID header)
      responses:
        '200':
          description: SSE stream of workflow history events
          content:
            text/event-stream:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    BadRequest:
      description: Invalid request body, query, or pagination token
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ValidationErrorResponse'
              - $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Workflow execution, workflow type, or catalog not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error (e.g. Temporal connection failure)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ValidationErrorResponse:
      type: object
      description: Request body validation failure (Zod)
      properties:
        error:
          type: string
          enum:
            - ValidationError
        message:
          type: string
          example: Invalid Payload
        issues:
          type: array
          description: Zod validation issues
          items:
            type: object
    ErrorResponse:
      type: object
      description: >-
        API error body (WorkflowNotFoundError, WorkflowExecutionTimedOutError,
        WorkflowNotCompletedError, CatalogNotAvailableError, or server error)
      properties:
        error:
          type: string
          description: >-
            Error type name (e.g. WorkflowNotFoundError,
            CatalogNotAvailableError)
        message:
          type: string
          description: Human-readable error message
        workflowId:
          type: string
          description: >-
            Workflow ID when the error is tied to a specific execution (e.g.
            timeout)
          nullable: true

````