DELETE/sites/:siteSlug/domains/:domainId
Remove a custom domain from the site. Deletes the Cloudflare Custom Hostname, removes routing from the edge KV, and deletes the domain record. This cannot be undone. Requires the domains:write scope.
Response
Returns { "data": { "success": true } } on success.
Code examples
cURL
curl "https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/domains/{domainId}" \
-H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
-X DELETEJavaScript
await fetch(`https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/domains/{domainId}`, {
method: "DELETE",
headers: { Authorization: "Bearer zxk_live_YOUR_API_KEY" },
});Base URL: https://www.zyberspace.com