---
title: "Stream a work session live"
---

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

# Stream a work session live

Path: CloudRaker Paperwork API › Work Sessions

`GET /v1/work-sessions/{id}/stream`

Server-sent events for one session, live: `text/event-stream`.

- `entry` — a durable timeline entry, redacted the same way `GET /entries` redacts it. The SSE `id` is the entry `seq`.
- `turn.started`, `turn.finished`, `turn.failed` — an agent began, ended or failed a piece of work.
- `approval.requested`, `approval.decided` — an action needs a person, or got one.
- `artifact.created`, `artifact.committed` — a document was produced, or filed into a space.
- `work_session.waiting`, `work_session.done` — the session needs you, or it has settled.
- `ping` — a keep-alive every fifteen seconds.

The same ten type names arrive on your webhook, so one handler serves both. Streams end after five minutes; reconnect with `?afterSeq=` or the `Last-Event-ID` header to resume. A `done` session ends the stream. curl it: `curl -N -H "authorization: Bearer $KEY" …/v1/work-sessions/ws_…/stream`

**Learn more:** [Work sessions](https://docs.cloudraker.com/paperwork/api)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`streamWorkSession.path.id`; string, required)
  - minLength 1; maxLength 128

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/v1/work-sessions/<id>/stream' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/work-sessions/<id>/stream';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/work-sessions/<id>/stream"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The event stream (`text/event-stream`).

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`streamWorkSession.response.400.success`; boolean, required)
  - one of `false`
- `error` (`streamWorkSession.response.400.error`; array<unknown>, required)
- `data` (`streamWorkSession.response.400.data`; unknown, required)

### 401

Missing or invalid credential.

### 403

The credential may not use the /v1 API.

### 404

Unknown session id, or it belongs to another API key.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`streamWorkSession.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`streamWorkSession.response.429.message`; string, required)
- `retryable` (`streamWorkSession.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`streamWorkSession.response.429.requestId`; string, required)
- `docUrl` (`streamWorkSession.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/work-sessions/stream-work-session/index.md
