Update a relay
PUT/accounts/{account_id}/moq/relays/{relay_id}
Updates a relay’s name and/or configuration. The relay ID goes in
the URL path — PUT /accounts/{account_id}/moq/relays/{relay_id} —
not the request body; there is no collection-level update endpoint.
This is also the only way to set a relay’s config (config cannot be
set at create time). Partial updates: omitted fields are preserved;
config sub-objects replace as whole objects when present.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Update a relay
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/moq/relays/$RELAY_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{}'{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"config": {
"upstreams": {
"enabled": true,
"upstreams": [
{
"url": "https://example.com"
}
]
}
},
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "Production Live Stream",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890",
"status": "connected"
}
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"config": {
"upstreams": {
"enabled": true,
"upstreams": [
{
"url": "https://example.com"
}
]
}
},
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "Production Live Stream",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890",
"status": "connected"
}
}