Delete a site
DELETE
/sites/{name}
const url = 'https://example.com/sites/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/sites/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
Name
string
Responses
Section titled “Responses”Successful Response
Authentication is required.
Media typeapplication/json
ErrorResponse
object
detail
required
Detail
string
Examplegenerated
{ "detail": "example"}A session token and site ownership are required.
Media typeapplication/json
ErrorResponse
object
detail
required
Detail
string
Examplegenerated
{ "detail": "example"}The site does not exist.
Media typeapplication/json
ErrorResponse
object
detail
required
Detail
string
Examplegenerated
{ "detail": "example"}Every custom domain must complete removal before deleting the site.
Media typeapplication/json
ErrorResponse
object
detail
required
Detail
string
Examplegenerated
{ "detail": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}