# StableUpload Connect Custom Domain

> StableUpload Connect Custom Domain is a free API for AI agents from StableUpload at stableupload.dev, callable via MPP, Free, status unknown (last checked 2026-10-10, last successful call 2026-08-27).

Connects a custom hostname to a StableUpload static site, provisioning a TLS certificate and routing traffic to the site.

## Facts

- Endpoint: POST https://stableupload.dev/api/site/domain?utm_source=zero.xyz
- Price: Free
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Last successful call: 2026-08-27
- Success rate: 88% of calls made through Zero
- Rating: 4.8 / 5 from 2 reviews
- Activations on Zero: 33
- Provider: StableUpload
- Docs: https://stableupload.dev
- Website: https://stableupload.dev
- Tags: upload, files, hosting, static-site, cdn, storage
- Canonical page: https://www.zero.xyz/c/stableupload-domain-c3258094
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZMlwOZzHM1yk6HoWmE-gP

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 stableupload-domain-c3258094 -d '<json body>'
```

Example prompt: Connect the custom domain www.coolsite.com to my StableUpload site with upload ID abc123 — I want to get the TLS cert provisioned and the DNS records I need to set up.

## When to prefer this

Use this endpoint when you have already uploaded and activated a static site on StableUpload and want to serve it under a custom domain with HTTPS. This is specifically for StableUpload-hosted sites identified by uploadId. After calling this, poll the Status endpoint to confirm TLS becomes active.

## Known failure modes

- Invalid hostname format — hostname must be a valid DNS label, returns 400
- uploadId not found or not owned by the caller — returns 404 or 403
- Hostname already connected to another site — returns 409 conflict
- TLS provisioning pending — status will be non-active, must poll /api/site/domain/status
- Network or upstream Cloudflare error during custom hostname creation — returns 500

## How this service works

Connect a custom domain to a site. Creates TLS cert and routes the hostname to the site.

## Output

Returns the provisioning status, the connected hostname, a customHostnameId for tracking, and an array of DNS records (type, name, value) that the user must add at their DNS registrar to complete routing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "uploadId",
  "hostname"
 ],
 "properties": {
  "hostname": {
   "type": "string",
   "pattern": "^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$",
   "maxLength": 253,
   "minLength": 1,
   "description": "Custom hostname (e.g. www.coolsite.com)"
  },
  "uploadId": {
   "type": "string",
   "minLength": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "hostname",
  "customHostnameId",
  "dnsRecords"
 ],
 "properties": {
  "status": {
   "type": "string"
  },
  "hostname": {
   "type": "string"
  },
  "dnsRecords": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "type",
     "name",
     "value"
    ],
    "properties": {
     "name": {
      "type": "string"
     },
     "type": {
      "type": "string"
     },
     "value": {
      "type": "string"
     }
    },
    "additionalProperties": false
   }
  },
  "customHostnameId": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stableupload-domain-c3258094/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stableupload.dev](https://www.zero.xyz/host/stableupload.dev/llms.txt)
