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, issuers, 3 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 { upstreams }
upstreams?: Upstreams { enabled, upstreams }

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

enabled?: boolean
upstreams?: Array<Upstream>

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

url?: string

Upstream MOQT server publisher URL.

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

“connected” when active, omitted otherwise.

RelayCreateResponse { config, created, issuers, 3 more }

Relay with its auto-created default token pair (one full-access [publish, subscribe] and one [subscribe]-only), each with its one-time secret, wrapped in the issuers envelope.

config: Config { upstreams }
upstreams?: Upstreams { enabled, upstreams }

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

enabled?: boolean
upstreams?: Array<Upstream>

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

url?: string

Upstream MOQT server publisher URL.

created: string
formatdate-time
issuers: Array<Issuer>

Token collection (discriminated union on type). On create this holds the auto-created default pair, each including its one-time secret.

cloudflare_tokens: Array<CloudflareToken>

Always present ([] when empty).

created: string
formatdate-time
expires: string

Mandatory; no more than 1 year after created.

formatdate-time
jti: string

Token identity and registry key (32 hex chars).

operations: Array<"publish" | "subscribe">

Signed allowlist of what the token may do. V1 coarse roles; the array form extends to fine-grained MoQT message names later without a breaking change.

One of the following:
"publish"
"subscribe"
label?: string

Optional, customer-set.

secret?: string

The signed JWT. Present ONLY in create / auto-create responses (shown once); never returned by list, never stored.

issuer: "cloudflare"
type: "cloudflare_jwt"
modified: string
formatdate-time
name: string
uid: string

Server-generated unique identifier (32 hex chars).

RelayUpdateResponse { config, created, modified, 3 more }

Full relay details (no tokens).

config: Config { upstreams }
upstreams?: Upstreams { enabled, upstreams }

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

enabled?: boolean
upstreams?: Array<Upstream>

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

url?: string

Upstream MOQT server publisher URL.

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

“connected” when active, omitted otherwise.

RelayDeleteResponse = unknown

RelaysTokens

Create a token
client.moq.relays.tokens.create(stringrelayID, TokenCreateParams { account_id, operations, expires_at, label } params, RequestOptionsoptions?): TokenCreateResponse { issuers }
POST/accounts/{account_id}/moq/relays/{relay_id}/tokens
List tokens
client.moq.relays.tokens.list(stringrelayID, TokenListParams { account_id } params, RequestOptionsoptions?): TokenListResponse { issuers }
GET/accounts/{account_id}/moq/relays/{relay_id}/tokens
Revoke a token
client.moq.relays.tokens.delete(stringjti, TokenDeleteParams { account_id, relay_id } params, RequestOptionsoptions?): TokenDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/moq/relays/{relay_id}/tokens/{jti}
ModelsExpand Collapse
TokenCreateResponse { issuers }

A relay’s token collection, keyed on issuer type (a discriminated union). V1 ships exactly one arm (cloudflare_jwt). Clients iterate issuers, switch on type, and ignore unknown types — that contract is what makes adding or removing an arm non-breaking.

issuers: Array<Issuer>
cloudflare_tokens: Array<CloudflareToken>

Always present ([] when empty).

created: string
formatdate-time
expires: string

Mandatory; no more than 1 year after created.

formatdate-time
jti: string

Token identity and registry key (32 hex chars).

operations: Array<"publish" | "subscribe">

Signed allowlist of what the token may do. V1 coarse roles; the array form extends to fine-grained MoQT message names later without a breaking change.

One of the following:
"publish"
"subscribe"
label?: string

Optional, customer-set.

secret?: string

The signed JWT. Present ONLY in create / auto-create responses (shown once); never returned by list, never stored.

issuer: "cloudflare"
type: "cloudflare_jwt"
TokenListResponse { issuers }

A relay’s token collection, keyed on issuer type (a discriminated union). V1 ships exactly one arm (cloudflare_jwt). Clients iterate issuers, switch on type, and ignore unknown types — that contract is what makes adding or removing an arm non-breaking.

issuers: Array<Issuer>
cloudflare_tokens: Array<CloudflareToken>

Always present ([] when empty).

created: string
formatdate-time
expires: string

Mandatory; no more than 1 year after created.

formatdate-time
jti: string

Token identity and registry key (32 hex chars).

operations: Array<"publish" | "subscribe">

Signed allowlist of what the token may do. V1 coarse roles; the array form extends to fine-grained MoQT message names later without a breaking change.

One of the following:
"publish"
"subscribe"
label?: string

Optional, customer-set.

secret?: string

The signed JWT. Present ONLY in create / auto-create responses (shown once); never returned by list, never stored.

issuer: "cloudflare"
type: "cloudflare_jwt"
TokenDeleteResponse { errors, messages, success }
errors: Array<Error>
code?: number
message?: string
messages: Array<Message>
code?: number
message?: string
success: boolean