POST/sites/:siteSlug/deployments/:deploymentId/rollback
Roll back to a previous deployment by promoting it to active. This is identical to publishing — the specified deployment becomes the live version instantly. Requires the deployments:write scope.
Path parameters
siteSlug: The site's URL slug. deploymentId: The ID of the deployment to restore. Can be any existing deployment — past or draft.
Response
Returns data.url — the live site URL after rollback.
Code examples
cURL
curl "https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/deployments/{deploymentId}/rollback" \
-H "Authorization: Bearer zxk_live_YOUR_API_KEY" \
-X POSTJavaScript
// Use the deploymentId of any previous deployment
const res = await fetch(
`https://www.zyberspace.com/api/v1/{teamSlug}/sites/my-site/deployments/{deploymentId}/rollback`,
{
method: "POST",
headers: { Authorization: "Bearer zxk_live_YOUR_API_KEY" },
}
);
const { data } = await res.json();
console.log(data.url);Base URL: https://www.zyberspace.com