Delete a site
Delete a site. Its pages, authors, deployments, and custom domains are deleted with it, and the published site goes offline. The only site and the default site cannot be deleted. Set another site as default first.
DELETE https://sitepaste.com/api/v1/public/sites/{siteId}
Requires the settings scope.
Usage
curl -X DELETE "https://sitepaste.com/api/v1/public/sites/s7k2m0dq1p3z" \
-H "Authorization: Bearer $TOKEN"
Authorizations
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication. |
Response
204 No Content. The site and its pages are gone, and the site is no longer published.
Errors
| Code | Meaning |
|---|---|
| 409 | cannot_delete_only_site or cannot_delete_default_site. The workspace’s state does not allow the delete |
| 400 | {siteId} is malformed |
| 404 | The site does not exist in your workspace |