Remove a domain from a service. Traffic to it stops, in place, without a redeploy. A port no other domain uses stops being public. The DNS record Pyo made for it in Cloudflare is deleted too, unless keepDnsRecord. Only a record Pyo made, still with its comment, is deleted. For a domain through the Cloudflare Tunnel, restoreRecords puts back the records the tunnel replaced (team owners and admins).
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/jsonRemove a domain from a service. Traffic to it stops, in place, without a redeploy. A port no other domain uses stops being public. The DNS record Pyo made for it in Cloudflare is deleted too, unless keepDnsRecord. Only a record Pyo made, still with its comment, is deleted. For a domain through the Cloudflare Tunnel, restoreRecords puts back the records the tunnel replaced (team owners and admins).
API key access: full.
op*"removeDomain""removeDomain"serviceId*stringdomainId*stringThe domain's id, or its hostname.
keepDnsRecord?booleanLeave the DNS record Pyo made in Cloudflare.
restoreRecords?booleanPut back the records the tunnel replaced.
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",
"op": "removeDomain",
"serviceId": "svc_8kq2x7ad"
}'{}