Skip to main content
DELETE
/
websites
/
{hostname}
Delete Website
curl --request DELETE \
  --url http://localhost:8080/websites/{hostname} \
  --cookie _me_sess=
import requests

url = "http://localhost:8080/websites/{hostname}"

headers = {"cookie": "_me_sess="}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {cookie: '_me_sess='}};

fetch('http://localhost:8080/websites/{hostname}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/websites/{hostname}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => "_me_sess=",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "http://localhost:8080/websites/{hostname}"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("cookie", "_me_sess=")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("http://localhost:8080/websites/{hostname}")
.header("cookie", "_me_sess=")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/websites/{hostname}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["cookie"] = '_me_sess='

response = http.request(request)
puts response.read_body
{
  "error": {
    "code": 400,
    "message": "<string>"
  }
}
{
"error": {
"code": 401,
"message": "<string>"
}
}
{
"error": {
"code": 403,
"message": "<string>"
}
}
{
"error": {
"code": 404,
"message": "<string>"
}
}
{
"error": {
"code": 500,
"message": "<string>"
}
}

Authorizations

_me_sess
string
cookie
required

Session token for authentication.

Path Parameters

hostname
string<hostname>
required

Hostname for the website.

Required string length: 1 - 253

Cookies

_me_sess
string
required

Session token for authentication.

Example:

"_me_sess=token; Path=/; HttpOnly; SameSite=Lax; Secure"

Response

Success No Content