# List Hosted Sites

> List Hosted Sites is a paid API for AI agents from cdn.withzero.xyz, paid per call via MPP, metered — billed by usage, status unknown (last checked 2026-10-09).

Returns a list of all static sites the authenticated user hosts, including slug, visibility, public/share URL, file count, size, and last update time.

## Facts

- Endpoint: GET https://cdn.withzero.xyz/api/v1/sites?utm_source=zero.xyz
- Price: metered — billed by usage
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Provider: cdn.withzero.xyz
- Website: https://cdn.withzero.xyz
- Canonical page: https://www.zero.xyz/c/cdn-withzero-xyz-list-hosted-sites-fd0498f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2mayPHqIhd1FpocDnjmQ2

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 cdn-withzero-xyz-list-hosted-sites-fd0498f4
```

Example prompt: Show me all the static sites I'm currently hosting on cdn.withzero.xyz — I want to see their slugs, whether they're public or private, their URLs, and when they were last updated.

## When to prefer this

Use this endpoint when you need an overview of all deployed sites for the authenticated user — e.g. to audit visibility settings, retrieve URLs, check storage usage, or identify slugs for use in subsequent PATCH/DELETE operations. It is the only endpoint that returns a full inventory of all sites in one call.

## Known failure modes

- 401 Unauthorized if authentication credentials are missing or invalid
- Empty sites array if no sites have been deployed yet
- Sites deployed before site settings existed appear as public with index.html routing

## How this service works

List the sites you host — slug, visibility, URL or share URL, file count, size, and last update.

## Output

An object containing a 'sites' array sorted by most recently updated first. Each site entry includes: slug (identifier for the deployment), visibility ('public', 'link', or 'password'), url (public URL if public, null otherwise), shareUrl (private share link if visibility is 'link' or 'password', null otherwise — treat as secret), spa (boolean indicating single-page-app routing), files (integer count of deployed files), sizeBytes (total size of those files in bytes), and updatedAt (ISO 8601 timestamp of last deploy or settings change).

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "sites"
 ],
 "properties": {
  "sites": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "slug",
     "visibility",
     "url",
     "shareUrl",
     "spa",
     "files",
     "sizeBytes",
     "updatedAt"
    ],
    "properties": {
     "spa": {
      "type": "boolean",
      "description": "Single-page-app routing: extensionless misses serve the site index.html."
     },
     "url": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Public URL when visibility is public; null otherwise."
     },
     "slug": {
      "type": "string",
      "description": "The slug the site was deployed under — pass it (URL-encoded) to PATCH or DELETE /api/v1/sites/{slug}."
     },
     "files": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "description": "Files currently deployed."
     },
     "shareUrl": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Private URL for link/password sites; null when public. Treat as a secret."
     },
     "sizeBytes": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "description": "Total size of those files."
     },
     "updatedAt": {
      "type": "string",
      "description": "ISO time of the last deploy or settings change."
     },
     "visibility": {
      "enum": [
       "public",
       "link",
       "password"
      ],
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "description": "Most recently updated first. Sites deployed before site settings existed appear as public, found by their index.html."
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cdn-withzero-xyz-list-hosted-sites-fd0498f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cdn.withzero.xyz](https://www.zero.xyz/host/cdn.withzero.xyz/llms.txt)
