Skip to content
Start here

Relays

List relays
moq.relays.list(RelayListParams**kwargs) -> SyncSinglePage[RelayListResponse]
GET/accounts/{account_id}/moq/relays
Get a relay
moq.relays.get(strrelay_id, RelayGetParams**kwargs) -> RelayGetResponse
GET/accounts/{account_id}/moq/relays/{relay_id}
Create a relay
moq.relays.create(RelayCreateParams**kwargs) -> RelayCreateResponse
POST/accounts/{account_id}/moq/relays
Update a relay
moq.relays.update(strrelay_id, RelayUpdateParams**kwargs) -> RelayUpdateResponse
PUT/accounts/{account_id}/moq/relays/{relay_id}
Delete a relay
moq.relays.delete(strrelay_id, RelayDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/moq/relays/{relay_id}
ModelsExpand Collapse
class RelayListResponse:

Abbreviated relay for list responses.

created: datetime
formatdate-time
modified: datetime
formatdate-time
name: str
uid: str
class RelayGetResponse:

Full relay details (no tokens).

config: Config
upstreams: Optional[ConfigUpstreams]

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

enabled: Optional[bool]
upstreams: Optional[List[ConfigUpstreamsUpstream]]

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: Optional[str]

Upstream MOQT server publisher URL.

created: datetime
formatdate-time
modified: datetime
formatdate-time
name: str
uid: str
status: Optional[Literal["connected"]]

“connected” when active, omitted otherwise.

class RelayCreateResponse:

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: Optional[ConfigUpstreams]

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

enabled: Optional[bool]
upstreams: Optional[List[ConfigUpstreamsUpstream]]

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: Optional[str]

Upstream MOQT server publisher URL.

created: datetime
formatdate-time
issuers: List[Issuer]

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

cloudflare_tokens: List[IssuerCloudflareToken]

Always present ([] when empty).

created: datetime
formatdate-time
expires: datetime

Mandatory; no more than 1 year after created.

formatdate-time
jti: str

Token identity and registry key (32 hex chars).

operations: List[Literal["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: Optional[str]

Optional, customer-set.

secret: Optional[str]

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

issuer: Literal["cloudflare"]
type: Literal["cloudflare_jwt"]
modified: datetime
formatdate-time
name: str
uid: str

Server-generated unique identifier (32 hex chars).

class RelayUpdateResponse:

Full relay details (no tokens).

config: Config
upstreams: Optional[ConfigUpstreams]

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

enabled: Optional[bool]
upstreams: Optional[List[ConfigUpstreamsUpstream]]

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: Optional[str]

Upstream MOQT server publisher URL.

created: datetime
formatdate-time
modified: datetime
formatdate-time
name: str
uid: str
status: Optional[Literal["connected"]]

“connected” when active, omitted otherwise.

RelaysTokens

Create a token
moq.relays.tokens.create(strrelay_id, TokenCreateParams**kwargs) -> TokenCreateResponse
POST/accounts/{account_id}/moq/relays/{relay_id}/tokens
List tokens
moq.relays.tokens.list(strrelay_id, TokenListParams**kwargs) -> TokenListResponse
GET/accounts/{account_id}/moq/relays/{relay_id}/tokens
Revoke a token
moq.relays.tokens.delete(strjti, TokenDeleteParams**kwargs) -> TokenDeleteResponse
DELETE/accounts/{account_id}/moq/relays/{relay_id}/tokens/{jti}
ModelsExpand Collapse
class TokenCreateResponse:

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: List[Issuer]
cloudflare_tokens: List[IssuerCloudflareToken]

Always present ([] when empty).

created: datetime
formatdate-time
expires: datetime

Mandatory; no more than 1 year after created.

formatdate-time
jti: str

Token identity and registry key (32 hex chars).

operations: List[Literal["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: Optional[str]

Optional, customer-set.

secret: Optional[str]

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

issuer: Literal["cloudflare"]
type: Literal["cloudflare_jwt"]
class TokenListResponse:

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: List[Issuer]
cloudflare_tokens: List[IssuerCloudflareToken]

Always present ([] when empty).

created: datetime
formatdate-time
expires: datetime

Mandatory; no more than 1 year after created.

formatdate-time
jti: str

Token identity and registry key (32 hex chars).

operations: List[Literal["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: Optional[str]

Optional, customer-set.

secret: Optional[str]

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

issuer: Literal["cloudflare"]
type: Literal["cloudflare_jwt"]
class TokenDeleteResponse:
errors: List[Error]
code: Optional[int]
message: Optional[str]
messages: List[Message]
code: Optional[int]
message: Optional[str]
success: bool