---
title: "Stream workflow history events via Server-Sent Events"
method: GET
path: "/workflow/{id}/history/stream"
---

# Stream workflow history events via Server-Sent Events

`GET /workflow/{id}/history/stream`

Opens a persistent SSE connection that delivers Temporal workflow history events in real time. Emits named events: `workflow` (metadata, once), `history` (event batches), `done` (terminal state), `server_error` (post-flush errors). The `done` event carries `{ reason, newRunId? }` where `reason` is the terminal Temporal event type (`WORKFLOW_EXECUTION_COMPLETED`, `WORKFLOW_EXECUTION_FAILED`, `WORKFLOW_EXECUTION_TIMED_OUT`, `WORKFLOW_EXECUTION_CANCELED`, `WORKFLOW_EXECUTION_TERMINATED`, `WORKFLOW_EXECUTION_CONTINUED_AS_NEW`) and `newRunId` is present only when the terminal event chains a follow-on run. `server_error` carries `{ error, message, workflowId, runId }`. Errors before the stream opens are returned as JSON HTTP responses (400/404); once open, failures arrive as a `server_error` event. Supports reconnect via `Last-Event-ID` header or `lastEventId` query param.

## Path parameters

- `id` string, required

## Query parameters

- `includePayloads` boolean
- `lastEventId` integer

## Response `200`

SSE stream of workflow history events

## Other responses

- `400` — Invalid request body, query, or pagination token
- `404` — Workflow execution, workflow type, or catalog not found
- `500` — Internal server error (e.g. Temporal connection failure)

---

[API](https://skmtc.net/growthxai/apis/output-ai-api.md) · [All operations](https://skmtc.net/growthxai/apis/output-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/growthxai/output-ai-api/versions/09a49e598435/schema)
