# Delete Hosted Site (host.withzero.ai)

> Delete Hosted Site (host.withzero.ai) 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).

Permanently deletes a hosted static site by slug before its TTL expires, removing KV metadata and detaching custom domains (Cloudflare Worker Custom Domain teardown requires a prior domain-delete call).

## Facts

- Endpoint: DELETE https://host.withzero.ai/sites/:slug?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-delete-hosted-site-host-withzero-ai-335276af
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_krNr4pn_v5-CMsBHoWMYC

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-delete-hosted-site-host-withzero-ai-335276af -d '<json body>'
```

Example prompt: Go ahead and delete my hosted site with the slug 'my-portfolio-2024' on host.withzero.ai — I want it taken down early and all custom domain KV entries removed.

## When to prefer this

Use this endpoint when you need to permanently remove a hosted static site before its TTL expires, or when cleaning up test/temporary deployments. It handles KV metadata cleanup automatically but requires you to manually call DELETE /sites/:slug/domains/:domain for each custom domain first if you want a clean Cloudflare-level teardown. Prefer this over simply letting the TTL expire when you need immediate removal or want to free up the slug.

## Known failure modes

- 403 Forbidden if the caller wallet does not match the slug owner
- 404 Not Found if the slug does not exist or has already expired
- Partial state if custom domains were not detached via DELETE /sites/:slug/domains/:domain before calling this endpoint — Cloudflare Worker Custom Domain bindings remain active
- 500 Internal Server Error if KV or R2 operations fail mid-delete

## How this service works

Delete a hosted site early. Owner-only. Also detaches any custom domains attached to this slug (CUSTOM_DOMAINS KV entries removed; Worker Custom Domain attachments at Cloudflare are NOT automatically torn down — call DELETE /sites/:slug/domains/:domain first if you want a clean removal).

## Output

Returns a JSON object confirming the site deletion. Custom domain CUSTOM_DOMAINS KV entries are removed as part of this call; however, Cloudflare Worker Custom Domain attachments are NOT automatically torn down and require a prior DELETE /sites/:slug/domains/:domain call for a fully clean removal.

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/host-withzero-ai-delete-hosted-site-host-withzero-ai-335276af/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)
