---
title: "Delete a site"
method: DELETE
path: "/api/v1/sites/{slug}"
tags: ["Sites"]
---

# Delete a site

`DELETE /api/v1/sites/{slug}`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/sites/{slug}`
- Auth: HTTP bearer

Permanently deletes the site: its content, asset files, addresses and directory entries. This cannot be undone. Only the site's owner can do it, and a guest token cannot. When `purge` is `queued`, the site is already gone and its stored files are being removed in the background.

## Path parameters

- `slug` string, required

## Response `200`

Deleted.

- DeleteSiteResponse
  - `ok` boolean, required
  - `purge` 'done' | 'queued': `queued`: the site is already gone everywhere it can be seen, and its stored files are still being removed in the background. `done`: nothing is left.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: Only the site's owner can delete it (`forbidden_role`); a read-only key or a guest token cannot (`forbidden_read_only`, `guest_requires_account`).
- `404`: No such site, or it is not visible to this account.
- `409`: The site is being renamed right now (`rename_active`). Retry when it finishes.
- `429`: Over the account's write budget (`rate_limited`). Retry after the `Retry-After` seconds.

---

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