---
title: "Restore a deleted website"
method: POST
path: "/websites/{websiteId}/restore"
tags: ["Websites"]
---

# Restore a deleted website

`POST /websites/{websiteId}/restore`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websites/{websiteId}/restore`
- Auth: HTTP bearer

Restores a soft-deleted website before its 30-day restore window expires: the deletion and purge-eligibility markers are cleared and the website returns to the active list. Calling this on an active website returns a 404. An expired restore window or an active website claiming the same slug returns a 409.

## Path parameters

- `websiteId` string, required

## Response `200`

The restored website.

- object
  - `id` string, required: Unique website id.
  - `organizationId` string, required: Id of the organization that owns the website.
  - `name` string, required: Display name, 1–200 characters.
  - `slug` string, required: URL-safe identifier unique among active websites in the organization.
  - `customDomainsEnabled` boolean, required: Whether custom domains are enabled. Enabling is owner-only and makes the website a billable site; custom domains can only be attached while `true`.
  - `headVersion` integer, required: Latest draft source version number; starts at 1.
  - `publishedVersion` integer, nullable, required: Currently published version. `null` when the website is not published.
  - `createdAt` string, date-time, required: When the website was created.
  - `updatedAt` string, date-time, required: When the website was last modified.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `409`: The request conflicts with the current state of the resource.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
