PATCH/sites/:siteSlug

Update a site's name or slug. Only include the fields you want to change. Requires the sites:write scope.

Request body

name (optional, string, 1–100 chars): New display name. slug (optional, string, 1–63 chars, /^[a-z0-9-]+$/): New subdomain slug. Must be unique and not reserved. Changing the slug immediately changes the live URL.

Response

Returns data.site with the updated fields.

Code examples

cURL
curl "https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site" \
  -H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"name":"Renamed Site"}'
JavaScript
const res = await fetch(`https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site`, {
  method: "PATCH",
  headers: {
    Authorization: "Bearer zxk_live_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "Renamed Site" }),
});
const { data } = await res.json();

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

Get your API key →