Skip to content
Start here

Relays

List relays
client.moq.relays.list(RelayListParams { account_id, asc, created_after, 2 more } params, RequestOptionsoptions?): SinglePage<RelayListResponse { created, modified, name, uid } >
GET/accounts/{account_id}/moq/relays
Get a relay
client.moq.relays.get(stringrelayId, RelayGetParams { account_id } params, RequestOptionsoptions?): RelayGetResponse { config, created, modified, 3 more }
GET/accounts/{account_id}/moq/relays/{relay_id}
Create a relay
client.moq.relays.create(RelayCreateParams { account_id, name } params, RequestOptionsoptions?): RelayCreateResponse { config, created, modified, 4 more }
POST/accounts/{account_id}/moq/relays
Update a relay
client.moq.relays.update(stringrelayId, RelayUpdateParams { account_id, config, name } params, RequestOptionsoptions?): RelayUpdateResponse { config, created, modified, 3 more }
PUT/accounts/{account_id}/moq/relays/{relay_id}
Delete a relay
client.moq.relays.delete(stringrelayId, RelayDeleteParams { account_id } params, RequestOptionsoptions?): RelayDeleteResponse | null
DELETE/accounts/{account_id}/moq/relays/{relay_id}
ModelsExpand Collapse
RelayListResponse { created, modified, name, uid }

Abbreviated relay for list responses.

created: string
formatdate-time
modified: string
formatdate-time
name: string
uid: string
RelayGetResponse { config, created, modified, 3 more }

Full relay details (no tokens).

config: Config { lingering_subscribe, origin_fallback }

origin_fallback and lingering_subscribe are mutually exclusive.

lingering_subscribe?: LingeringSubscribe { enabled, max_timeout_ms }
enabled?: boolean
max_timeout_ms?: number

Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.

maximum300000
minimum0
origin_fallback?: OriginFallback { enabled, origins }
enabled?: boolean
origins?: Array<Origin>

Ordered list of upstream origin relays. Each entry is an object (not a bare string) so per-origin configuration can be added in the future without another breaking change.

url?: string

Upstream origin relay URL.

created: string
formatdate-time
modified: string
formatdate-time
name: string
uid: string
status?: "connected"

“connected” when active, omitted otherwise.

RelayCreateResponse { config, created, modified, 4 more }

Relay with auto-generated tokens (shown once).

config: Config { lingering_subscribe, origin_fallback }

origin_fallback and lingering_subscribe are mutually exclusive.

lingering_subscribe?: LingeringSubscribe { enabled, max_timeout_ms }
enabled?: boolean
max_timeout_ms?: number

Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.

maximum300000
minimum0
origin_fallback?: OriginFallback { enabled, origins }
enabled?: boolean
origins?: Array<Origin>

Ordered list of upstream origin relays. Each entry is an object (not a bare string) so per-origin configuration can be added in the future without another breaking change.

url?: string

Upstream origin relay URL.

created: string
formatdate-time
modified: string
formatdate-time
name: string
token_publish_subscribe: string

Full access token (publish + subscribe). Treat as sensitive.

token_subscribe: string

Subscribe-only token. Treat as sensitive.

uid: string

Server-generated unique identifier (32 hex chars).

RelayUpdateResponse { config, created, modified, 3 more }

Full relay details (no tokens).

config: Config { lingering_subscribe, origin_fallback }

origin_fallback and lingering_subscribe are mutually exclusive.

lingering_subscribe?: LingeringSubscribe { enabled, max_timeout_ms }
enabled?: boolean
max_timeout_ms?: number

Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.

maximum300000
minimum0
origin_fallback?: OriginFallback { enabled, origins }
enabled?: boolean
origins?: Array<Origin>

Ordered list of upstream origin relays. Each entry is an object (not a bare string) so per-origin configuration can be added in the future without another breaking change.

url?: string

Upstream origin relay URL.

created: string
formatdate-time
modified: string
formatdate-time
name: string
uid: string
status?: "connected"

“connected” when active, omitted otherwise.

RelayDeleteResponse = unknown

RelaysTokens

Rotate a token
client.moq.relays.tokens.rotate(stringrelayId, TokenRotateParams { account_id, type } params, RequestOptionsoptions?): TokenRotateResponse { token, type }
POST/accounts/{account_id}/moq/relays/{relay_id}/tokens/rotate
ModelsExpand Collapse
TokenRotateResponse { token, type }
token: string

New token value (shown once). Treat as sensitive.

type: "publish_subscribe" | "subscribe"
One of the following:
"publish_subscribe"
"subscribe"