---
title: "Delete a site"
method: DELETE
path: "/api/v1/site/{siteId}"
tags: ["Site"]
---

# Delete a site

`DELETE /api/v1/site/{siteId}`

Deletes the specified site asynchronously. The default site cannot be deleted; you must first mark another site as default before deleting. The 'siteId' parameter is the site identifier (also known as 'hostId' or 'host' in other parts of the API).

## Path parameters

- `siteId` string, required

## Response `200`

Site deleted successfully

- ResponseEntityBooleanView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Cannot delete the default site, or site does not exist
- `401` — Unauthorized access
- `403` — User does not have permission to delete sites

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
