Serve a domain through the cluster's Cloudflare Tunnel (on), or move it back. Pyo adds the tunnel's route first, then points the name at the tunnel with a proxied CNAME, so both paths answer while it moves. When records Pyo didn't make have the name, the domain's dnsRecord.status turns "conflict" and existing lists them (at once, in the answer too, when Cloudflare can be asked). Send it again with replace to replace them (team owners and admins): Pyo keeps a copy. Moving back with restore puts that copy back (team owners and admins), or without one, points the name at the cluster's public IP. A name one level under the tunnel's default domain always goes through the tunnel, so moving it back is refused unless a record it replaced comes back. A new name one level under the default domain gets no record of its own when nothing else at Cloudflare answers for it: the default domain's wildcard record has it, and the answer is status: "active". A name that's already only through the tunnel stays that way while its own record is made. After the record moves, both paths stay open until Cloudflare's edge sends the name through the tunnel. With on and finish (Finish now, team owners and admins), a domain whose record is on the tunnel goes only through the tunnel at once: the direct path closes, and visitors Cloudflare still sends the old way get 404.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonServe a domain through the cluster's Cloudflare Tunnel (on), or move it back. Pyo adds the tunnel's route first, then points the name at the tunnel with a proxied CNAME, so both paths answer while it moves. When records Pyo didn't make have the name, the domain's dnsRecord.status turns "conflict" and existing lists them (at once, in the answer too, when Cloudflare can be asked). Send it again with replace to replace them (team owners and admins): Pyo keeps a copy. Moving back with restore puts that copy back (team owners and admins), or without one, points the name at the cluster's public IP. A name one level under the tunnel's default domain always goes through the tunnel, so moving it back is refused unless a record it replaced comes back. A new name one level under the default domain gets no record of its own when nothing else at Cloudflare answers for it: the default domain's wildcard record has it, and the answer is status: "active". A name that's already only through the tunnel stays that way while its own record is made. After the record moves, both paths stay open until Cloudflare's edge sends the name through the tunnel. With on and finish (Finish now, team owners and admins), a domain whose record is on the tunnel goes only through the tunnel at once: the direct path closes, and visitors Cloudflare still sends the old way get 404.
API key access: full.
op*"setDomainTunnel""setDomainTunnel"serviceId*stringdomainId*stringon*booleanreplace?booleanReplace the records in the way.
finish?booleanWith on: Finish now. Close the direct path without waiting for Cloudflare's edge.
restore?booleanMoving back: put back the records the tunnel replaced. On by default.
Done. Always ok: true, and some operations add more, such as a new API key or a join command. A warning comes with a change that went through but won't fully take effect yet, such as more replicas than the servers have room for.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/ops' \
-H 'Content-Type: application/json' \
-d '{
"domainId": "dom_8kq2x7ad",
"on": true,
"op": "setDomainTunnel",
"serviceId": "svc_8kq2x7ad"
}'{}