{"uid":"cap_HFHBRPIM5qcRhKmLopriZ","slug":"host-withzero-ai-detach-custom-domain-from-site-slug-9c112eb2","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 (so the hostname no longer routes to the sites worker).","url":"https://host.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_x85Qz6ls1aEx_fkAu5D31","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"host-site-delete-sites-slug-domains-domain:1"}],"brandName":"host.withzero.ai","brandSlug":"host-withzero-ai-mpp","brandBaseUrl":"https://host.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.ai — I want to stop that hostname from routing to my hosted site.","exampleUseCases":[{"title":"Retire a decommissioned custom domain","prompt":"I'm shutting down my old product landing page. Please remove the custom domain 'oldproduct.io' from the slug 'old-landing' on my withzero.ai site so it no longer routes anywhere."},{"title":"Swap domain to a different site slug","prompt":"I need to detach 'mycoolsite.com' from the slug 'site-v1' before I can attach it to my new slug. Can you remove that domain mapping now?"},{"title":"Clean up domains before deleting a slug","prompt":"Before I delete my site slug 'test-campaign', can you detach the custom domain 'campaign2023.com' from it so the Cloudflare routing is properly torn down?"}],"resultDescription":"A JSON object confirming the detachment — the CUSTOM_DOMAINS KV entry is deleted and the Cloudflare Worker Custom Domain attachment is torn down, meaning the hostname no longer routes to the site worker.","failureModes":["Caller is not the slug owner — returns authorization error","Domain is not attached to this slug — returns not found or no-op error","Slug does not exist — returns 404","Cloudflare API error during Worker Custom Domain teardown — may return 500","Invalid slug or domain format — returns validation error"],"whenToPreferThis":"Use this endpoint when you need to permanently stop a custom hostname from routing to a specific hosted site slug on withzero.ai. Prefer this over simply deleting the slug (which also detaches domains) when you want to preserve the site content while reclaiming or reassigning the domain. This is the correct endpoint when cleaning up domain assignments before re-attaching them to a different slug.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T02:47:11.587Z","isFirstParty":true,"canonicalSlug":"host-withzero-ai-detach-custom-domain-from-site-slug-9c112eb2"}