# Replace Hosted Site Content (host.withzero.ai)

> Replace Hosted Site Content (host.withzero.ai) is a paid API for AI agents from host.withzero.ai, paid per call via MPP, metered — billed by usage, status healthy (last checked 2026-10-02, last successful call 2026-10-02).

Replaces the content of an existing hosted static site slug with new content, optionally refreshing its TTL; owner-only operation.

## Facts

- Endpoint: PUT https://host.withzero.ai/sites/:slug?utm_source=zero.xyz
- Price: metered — billed by usage
- Payment: MPP
- Status: healthy
- Last checked: 2026-10-02
- Last successful call: 2026-10-02
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 4
- Provider: host.withzero.ai
- Website: https://host.withzero.ai
- Canonical page: https://www.zero.xyz/c/host-withzero-ai-replace-hosted-site-content-host-withzero-ai-32b81db6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yeS91pWvfaUqhFS5-zvsv

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-replace-hosted-site-content-host-withzero-ai-32b81db6 -d '<json body>'
```

Example prompt: Update my hosted site at slug 'my-portfolio' with this new HTML content: '<html><body><h1>Updated Portfolio</h1></body></html>', and set the TTL to 48 hours.

## When to prefer this

Use this endpoint when you need to update or overwrite the content of a site slug that already exists on host.withzero.ai, rather than deleting and re-uploading. Prefer this over the upload endpoint when the slug is already registered to your wallet and you want to preserve the slug identity, optionally refreshing its TTL at the same time.

## Known failure modes

- 403 Forbidden if the caller is not the owner of the slug
- 404 Not Found if the slug does not exist
- 400 Bad Request if content is empty or exceeds 2,000,000 characters
- 400 Bad Request if ttlHours is outside the range 0.5–4320
- Authentication/wallet verification failure if caller identity cannot be confirmed

## How this service works

Replace the content of an existing slug. Owner-only. Refreshes the TTL if `ttlHours` is supplied; otherwise preserves the existing one.

## Output

Returns an object confirming the update, typically including the slug and updated metadata for the hosted site.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "content"
 ],
 "properties": {
  "content": {
   "type": "string",
   "maxLength": 2000000,
   "minLength": 1
  },
  "ttlHours": {
   "type": "number",
   "maximum": 4320,
   "minimum": 0.5
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

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

## More

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