---
title: "Stream workflow run events (SSE)"
method: GET
path: "/v1/workflows/runs/{run_id}/events"
tags: ["workflows"]
---

# Stream workflow run events (SSE)

`GET /v1/workflows/runs/{run_id}/events`

## Request

- Base URL: `https://coasty.ai`
- URL: `https://coasty.ai/v1/workflows/runs/{run_id}/events`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/coasty/apis/coasty-public-api/docs/v1/workflows/runs/:run_id/events/get.ts> (a function with typed inputs; its response is checked against the schema)

Scope: `workflows:read`. Free. Ordered at-least-once SSE for successfully persisted frames; resume with `Last-Event-ID` or `?after=<seq>`. Workflow event appends, including terminal frames, are best-effort and can be absent if storage or the worker fails after the durable state transition. The edge may rotate a connection after 300 seconds; reconcile authoritative state with GET /v1/workflows/runs/{run_id} rather than waiting indefinitely for a terminal frame.

As with run streams, the connection can close on `event: done`, on `event: timeout` with `data: {"reason":"stream_max_duration"}` when the server's stream wall-clock ceiling is reached (the workflow run may still be going), or on `event: error` with `data: {"code":..., "message":...}`. Only `done` describes the run; the other two describe the stream.

## Query parameters

- `after` integer

## Headers

- `Last-Event-ID` integer

## Response `200`

SSE stream (text/event-stream).

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `403`: API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404`: Resource not found in this key's namespace.
- `409`: The resource state conflicts with this operation.
- `413`: The request body exceeds the endpoint limit.
- `422`: The JSON shape is valid but one or more values violate the endpoint contract.
- `429`: Rate or concurrency limit exceeded.
- `500`: Unexpected server error. Retry with exponential backoff.
- `502`: An upstream dependency returned an invalid response.
- `503`: A required service is temporarily unavailable.
- `504`: An upstream dependency timed out.

---

[API](https://skmtc.dev/coasty/apis/coasty-public-api.md) - [All operations](https://skmtc.dev/coasty/apis/coasty-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coasty/apis/coasty-public-api/revisions/f50d93b0d8a1?raw)
