Create Realtime Ws Token
Mint a short-lived realtime token for WebSocket or SSE authentication.
Connection flow:
- Call
POST /ws/tokenwith yourcapout-api-key. - Read
token,ws_url, andsse_urlfrom the response. - Connect to
wss://api.capout.ai/ws/status?token=<token>for WebSocket updates, orhttps://api.capout.ai/sse/status?token=<token>for Server-Sent Events. - Optionally scope the initial subscription with either:
&document_id=<document_id>repeated one or more times&recent=10to subscribe to the most recent organization-owned documents
WebSocket example:
wss://api.capout.ai/ws/status?token=<token>&document_id=doc_123
SSE example:
https://api.capout.ai/sse/status?token=<token>&recent=10
After a WebSocket connection is established, clients can send JSON commands such as:
{"action":"subscribe","document_ids":["doc_123"]}
Headers
Response
Successful Response
Response body for POST /ws/token.
Short-lived realtime token for query-param auth
Organization bound to this realtime token
UTC expiration time for the realtime token
WebSocket path to connect to with ?token=<token>
SSE path to connect to with ?token=<token>