Skip to content

Ws

Generated from DialerDigital/core commit 6e9f026f0a72 — spec openapi/dialer-v1.yaml v0.36.0. Do not edit by hand; see How this reference is built. Download the OpenAPI spec.

Endpoints

MethodPathSummary
POST/v1/ws/ticketMint an ephemeral single-use WebSocket ticket

Mint an ephemeral single-use WebSocket ticket

http
POST /v1/ws/ticket

Mints 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.

FieldTypeRequiredDescription
ticketstringyesPresent it as GET /v1/ws?ticket=…. Never reusable.
expires_atstring (date-time)yesAbsolute expiry (RFC-3339).
expires_inintegeryesSeconds 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).

json
{
  "error": {
    "code": "unauthorized",
    "message": "invalid or revoked API key"
  }
}

403 — Forbidden

The tenant is suspended.

json
{
  "error": {
    "code": "forbidden",
    "message": "tenant is suspended"
  }
}

503

The ticket could not be minted (storage unavailable). Fail-closed — no socket is opened.

json
{
  "error": {
    "code": "unavailable",
    "message": "could not mint a websocket ticket"
  }
}

Nothing in these docs is legal advice — always confirm compliance posture with your own counsel.