POST/sites

Create a new site. The slug becomes the subdomain (slug.zxapi.net) and must be unique. Requires the sites:write scope.

Request body

name (required, string, 1–100 chars): Human-readable site name. slug (required, string, 1–63 chars, /^[a-z0-9-]+$/): URL-safe identifier, becomes the subdomain. Must not be a reserved slug.

Limits

Free plan: max 5 sites per team. Attempting to create a 6th site returns 403 limit_reached. A 409 conflict is returned if the slug is already taken by any team.

Response

Returns 201 Created with the new site object under data.site.

Example response

{
  "data": {
    "site": {
      "id": "ITS5NWSXasJyk5lY9G4MH",
      "teamId": "team_VW7udY-vcaZeGacT7IPSS",
      "name": "My New Site",
      "slug": "my-new-site",
      "isDeleted": false,
      "deletedAt": null,
      "createdAt": "2026-03-25T20:41:14.447Z",
      "updatedAt": "2026-03-25T20:41:14.447Z",
      "url": "https://my-new-site.zxapi.net"
    }
  }
}

Code examples

cURL
curl "https://www.zyberspace.com/api/v1/{teamSlug}/sites" \
  -H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"name":"My New Site","slug":"my-new-site"}'
JavaScript
const res = await fetch(`https://www.zyberspace.com/api/v1/{teamSlug}/sites`, {
  method: "POST",
  headers: {
    Authorization: "Bearer zxk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "My New Site", slug: "my-new-site" }),
});
const { data } = await res.json(); // 201 Created
console.log(data.site.url); // https://my-new-site.zxapi.net

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

Get your API key →