---
title: MoQ
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# MoQ

#### MoQRelays

##### [List relays](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/methods/list)

client.moq.relays.list(RelayListParams { account\_id, asc, created\_after, 2 more } params, RequestOptionsoptions?): SinglePage<[RelayListResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays%20%3E%20%28model%29%20relay%5Flist%5Fresponse%20%3E%20%28schema%29) { created, modified, name, uid } \>

GET/accounts/{account\_id}/moq/relays

##### [Get a relay](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/methods/get)

client.moq.relays.get(stringrelayID, RelayGetParams { account\_id } params, RequestOptionsoptions?): [RelayGetResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays%20%3E%20%28model%29%20relay%5Fget%5Fresponse%20%3E%20%28schema%29) { config, created, modified, 3 more } 

GET/accounts/{account\_id}/moq/relays/{relay\_id}

##### [Create a relay](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/methods/create)

client.moq.relays.create(RelayCreateParams { account\_id, name } params, RequestOptionsoptions?): [RelayCreateResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays%20%3E%20%28model%29%20relay%5Fcreate%5Fresponse%20%3E%20%28schema%29) { config, created, issuers, 3 more } 

POST/accounts/{account\_id}/moq/relays

##### [Update a relay](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/methods/update)

client.moq.relays.update(stringrelayID, RelayUpdateParams { account\_id, config, name } params, RequestOptionsoptions?): [RelayUpdateResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays%20%3E%20%28model%29%20relay%5Fupdate%5Fresponse%20%3E%20%28schema%29) { config, created, modified, 3 more } 

PUT/accounts/{account\_id}/moq/relays/{relay\_id}

##### [Delete a relay](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/methods/delete)

client.moq.relays.delete(stringrelayID, RelayDeleteParams { account\_id } params, RequestOptionsoptions?): [RelayDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays%20%3E%20%28model%29%20relay%5Fdelete%5Fresponse%20%3E%20%28schema%29) | 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. Must be an absolute URL with a host and a scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport). Validated on update (PUT); rejected with 21013.

formaturi

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. Must be an absolute URL with a host and a scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport). Validated on update (PUT); rejected with 21013.

formaturi

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. Must be an absolute URL with a host and a scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport). Validated on update (PUT); rejected with 21013.

formaturi

created: string

formatdate-time

modified: string

formatdate-time

name: string

uid: string

status?: "connected"

“connected” when active, omitted otherwise.

RelayDeleteResponse \= unknown

#### MoQRelaysTokens

##### [Create a token](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/subresources/tokens/methods/create)

client.moq.relays.tokens.create(stringrelayID, TokenCreateParams { account\_id, operations, expires, label } params, RequestOptionsoptions?): [TokenCreateResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays.tokens%20%3E%20%28model%29%20token%5Fcreate%5Fresponse%20%3E%20%28schema%29) { issuers } 

POST/accounts/{account\_id}/moq/relays/{relay\_id}/tokens

##### [List tokens](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/subresources/tokens/methods/list)

client.moq.relays.tokens.list(stringrelayID, TokenListParams { account\_id } params, RequestOptionsoptions?): [TokenListResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays.tokens%20%3E%20%28model%29%20token%5Flist%5Fresponse%20%3E%20%28schema%29) { issuers } 

GET/accounts/{account\_id}/moq/relays/{relay\_id}/tokens

##### [Revoke a token](https://developers.cloudflare.com/api/typescript/resources/moq/subresources/relays/subresources/tokens/methods/delete)

client.moq.relays.tokens.delete(stringjti, TokenDeleteParams { account\_id, relay\_id } params, RequestOptionsoptions?): [TokenDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/moq#%28resource%29%20moq.relays.tokens%20%3E%20%28model%29%20token%5Fdelete%5Fresponse%20%3E%20%28schema%29) { 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