{"uid":"cap_nEHurRSCQUrmHERAKVj7B","slug":"site-withzero-ai-detach-custom-domain-from-site-slug-b684caab","name":"Detach Custom Domain from Site Slug","description":"Detach a custom domain from this slug. Owner-only. Removes the CUSTOM_DOMAINS KV mapping AND tears down the Cloudflare Worker Custom Domain attachment.","url":"https://site.withzero.ai/sites/:slug/domains/:domain?utm_source=zero.xyz","method":"DELETE","headers":{},"bodySchema":null,"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"proven_free","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"metered","summary":"metered — billed by usage","primary":{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_2PS_0pXOLp6_eJg9V8NEJ","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"make-website-delete-sites-slug-domains-domain:1"}],"brandName":"site.withzero.ai","brandSlug":"site-withzero-ai-mpp","brandBaseUrl":"https://site.withzero.ai","brandDocsUrl":null,"whatItDoes":"Removes a custom domain from a hosted site slug by deleting the KV mapping and tearing down the Cloudflare Worker Custom Domain attachment.","exampleAgentPrompt":"Detach the custom domain myblog.com from my site slug 'my-portfolio' on withzero — remove the domain mapping and tear down the Cloudflare attachment.","exampleUseCases":[{"title":"Releasing an expired domain","prompt":"I'm not renewing myoldsite.com anymore — detach it from the 'old-project' slug on withzero so it's no longer mapped and the Cloudflare attachment is cleaned up."},{"title":"Switching to a new custom domain","prompt":"I want to swap domains on my site — please remove 'shop.myolddomain.com' from the slug 'ecommerce-landing' on withzero before I attach the new one."},{"title":"Cleaning up a deprecated site's domain","prompt":"I've moved my portfolio to a different platform, so please detach 'portfolio.mysite.dev' from the withzero slug 'portfolio-v2' and take down the Cloudflare custom domain routing."}],"resultDescription":"Returns a JSON object confirming that the custom domain has been detached from the slug — the CUSTOM_DOMAINS KV mapping is removed and the Cloudflare Worker Custom Domain attachment is torn down.","failureModes":["Caller is not the owner of the slug — returns authorization error","Slug does not exist — returns not found error","Domain was not attached to the slug — may return not found or no-op","Cloudflare teardown fails mid-operation — partial state possible","Invalid slug or domain format — returns validation error"],"whenToPreferThis":"Use this endpoint when you need to remove a custom domain that was previously attached to a withzero.ai site slug, especially when switching domains, decommissioning sites, or cleaning up stale mappings. It is distinct from deleting the site itself and only removes the domain association.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:35:18.520Z","isFirstParty":true,"canonicalSlug":"site-withzero-ai-detach-custom-domain-from-site-slug-b684caab"}