# Detach Custom Domain from Site Slug

> Detach Custom Domain from Site Slug is a paid API for AI agents from host.withzero.ai, paid per call via MPP, metered — billed by usage, status unknown (last checked 2026-09-30).

Removes a custom domain from a hosted site slug by deleting the KV mapping and tearing down the Cloudflare Worker Custom Domain attachment.

## Facts

- Endpoint: DELETE https://host.withzero.ai/sites/:slug/domains/:domain?utm_source=zero.xyz
- Price: metered — billed by usage
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Provider: host.withzero.ai
- Website: https://host.withzero.ai
- Canonical page: https://www.zero.xyz/c/host-withzero-ai-detach-custom-domain-from-site-slug-9c112eb2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HFHBRPIM5qcRhKmLopriZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability host-withzero-ai-detach-custom-domain-from-site-slug-9c112eb2 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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).

## Output

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.

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/host-withzero-ai-detach-custom-domain-from-site-slug-9c112eb2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from host.withzero.ai](https://www.zero.xyz/host/host.withzero.ai/llms.txt)
