Ws
Generated from
DialerDigital/corecommit6e9f026f0a72— specopenapi/dialer-v1.yamlv0.36.0. Do not edit by hand; see How this reference is built. Download the OpenAPI spec.
Endpoints
| Method | Path | Summary |
|---|---|---|
POST | /v1/ws/ticket | Mint an ephemeral single-use WebSocket ticket |
Mint an ephemeral single-use WebSocket ticket
POST /v1/ws/ticketMints the ONLY credential GET /v1/ws accepts (MT-SEC-05 / MT-SEC-10).
Browsers cannot set headers on a WebSocket handshake, so the credential must ride the query string — where it lands in access logs, history and Referer. This endpoint makes what rides there worthless: the ticket expires in seconds and is BURNED on first redemption. The long-lived bearer stays where it can go: this request's Authorization header.
The ticket inherits the EXACT principal of the bearer that minted it — a ddw_ agent bearer mints an agent-lane ticket, never a tenant one. Lane is encoded in the prefix (ddta_ agent, ddtt_ tenant) so the public edge can admit only the agent lane without a database lookup.
Redemption is single-use: a second GET /v1/ws with the same ticket is rejected, as is an expired one. Both answer the same 401 as an unknown ticket — the client learns nothing from the difference.
Responses
201
A freshly minted ticket. It is valid for expires_in seconds and for ONE handshake.
| Field | Type | Required | Description |
|---|---|---|---|
ticket | string | yes | Present it as GET /v1/ws?ticket=…. Never reusable. |
expires_at | string (date-time) | yes | Absolute expiry (RFC-3339). |
expires_in | integer | yes | Seconds of life. Deliberately small. |
401 — Unauthorized
Missing, unknown or revoked API key (or, on /v1/admin/*, a bad/unset admin token; on webhooks, a bad/missing signature).
{
"error": {
"code": "unauthorized",
"message": "invalid or revoked API key"
}
}403 — Forbidden
The tenant is suspended.
{
"error": {
"code": "forbidden",
"message": "tenant is suspended"
}
}503
The ticket could not be minted (storage unavailable). Fail-closed — no socket is opened.
{
"error": {
"code": "unavailable",
"message": "could not mint a websocket ticket"
}
}