---
title: "Create a realtime streaming ticket"
method: POST
path: "/v2/realtime/ticket"
---

# Create a realtime streaming ticket

`POST /v2/realtime/ticket`

Exchange your API key (or session) for a short-lived ticket that authenticates a connection to the realtime object-change stream. Open a WebSocket to the push endpoint with the returned ticket as the `token` query parameter. The ticket is single-purpose and expires quickly; call this again to obtain a fresh one before reconnecting.

## Response `200`

OK

- RealtimeTicket
  - `ticket` string, required — Short-lived token authenticating a realtime WebSocket connection. Pass as the `token` query parameter when connecting.
  - `expires_in` integer, required — Seconds until the ticket expires. Refresh (call the endpoint again) before reconnecting.
  - `ws_url` string, nullable, required — WebSocket URL for this environment (wss://stream.developers[.staging].micro.so). Connect here with the ticket as the `token` query parameter.

## Other responses

- `401` — Missing or invalid credentials.
- `500` — Unexpected server error. Retry with backoff; report `request_id` if persistent.

---

[API](https://skmtc.net/micro-so/apis/prism.md) · [All operations](https://skmtc.net/micro-so/apis/prism/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/micro-so/prism/versions/558afa74332e/schema)
