Quick Start

Deploy a static site from a ZIP file in under a minute. Create a site, upload a deployment, then publish it to go live on your *.zxapi.net subdomain.

Step 1 — Create a site

Call POST /api/v1/{teamSlug}/sites with a name and a slug. The slug becomes your subdomain: slug.zxapi.net. Slugs must be lowercase alphanumeric with hyphens and unique across all teams.

Step 2 — Upload a deployment

Send a multipart/form-data POST to /api/v1/{teamSlug}/sites/{siteSlug}/deployments with a file field containing your ZIP archive. The ZIP is unpacked and all files are uploaded to R2 edge storage. A deploymentId is returned and the deployment starts in draft status.

Step 3 — Publish

Call POST /api/v1/{teamSlug}/sites/{siteSlug}/deployments/{deploymentId}/publish to promote the draft to active. Files are atomically copied to the live prefix and the site URL goes live immediately.

Rollback

To rollback, call POST /api/v1/{teamSlug}/sites/{siteSlug}/deployments/{oldDeploymentId}/rollback — identical to publish but points to a previous deployment. Old deployments are kept until explicitly deleted.

Code examples

cURL
# 1. Create site
curl -X POST "https://www.zyberspace.com/api/v1/{teamSlug}/sites" \
  -H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Site","slug":"my-site"}'

# 2. Upload deployment (ZIP file)
curl -X POST "https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/deployments" \
  -H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
  -F "file=@dist.zip"

# 3. Publish (use deploymentId from step 2)
curl -X POST "https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/deployments/{deploymentId}/publish" \
  -H "Authorization: Bearer zxk_live_YOUR_API_KEY"
JavaScript
const BASE = "https://www.zyberspace.com/api/v1/{teamSlug}";
const headers = { Authorization: "Bearer zxk_live_YOUR_API_KEY" };

// 1. Create site
const site = await fetch(`${BASE}/sites`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({ name: "My Site", slug: "my-site" }),
}).then(r => r.json());

// 2. Upload ZIP
const form = new FormData();
form.append("file", zipBlob, "deploy.zip");
const deploy = await fetch(`${BASE}/sites/my-site/deployments`, {
  method: "POST", headers, body: form,
}).then(r => r.json());

// 3. Publish
await fetch(`${BASE}/sites/my-site/deployments/${deploy.data.deploymentId}/publish`, {
  method: "POST", headers,
});

Base URL: https://www.zyberspace.com

Get your API key →