---
title: "Create a realtime session"
method: POST
path: "/v1/realtime/session"
tags: ["realtime"]
---

# Create a realtime session

`POST /v1/realtime/session`

Mints a short-lived token for the workflow realtime Socket.IO endpoint. Connect with socket.io-client using `path: socketPath` and `auth: {token: sessionToken}`, then subscribe to topics (workflow-runs, run, activity, execution, contract). Returns 503 when the realtime transport is not enabled on the environment — fall back to the SSE stream endpoints.

## Response `200`

sessionToken + socketPath + expiresInSeconds

- object

## Other responses

- `403` — Forbidden
- `503` — Service Unavailable

---

[API](https://skmtc.dev/b3os/apis/b3os-workflow-api.md) · [All operations](https://skmtc.dev/b3os/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/b3os/b3os-workflow-api/revisions/a8c7af3c66a1/schema)
