---
title: "Delete a website"
method: DELETE
path: "/websites/{websiteId}"
tags: ["Websites"]
---

# Delete a website

`DELETE /websites/{websiteId}`

## Request

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

Soft-deletes only the website: it moves to the trash for 30 days and disappears from the default list. Its custom domains are disconnected, which frees the website’s plan slot and releases each hostname for use on another website; restoring the website does not restore them. CMS content, assets, source history, and deployments keep their existing lifecycle state but become inaccessible through the deleted parent. After the purge deadline shown by `websites.list` with `status=deleted`, the website and its dependent data are permanently deleted. Deleting a website that is already in the trash returns 404. Restore it before expiry with `POST /websites/{websiteId}/restore`.

## Path parameters

- `websiteId` string, required

## Response `200`

Confirmation that the website was deleted.

- object
  - `deleted` true, required: Always `true` once the website is in the trash.

## 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.
- `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)
