API

Delete hostname

DELETEhttps://api.visitors.now/v1/project/hostnames/:hostname

Removes an allowed hostname from the project.

Request

index.ts
const hostname = encodeURIComponent("*.visitors.now");

const res = await fetch(`https://api.visitors.now/v1/project/hostnames/${hostname}`, {
  method: "DELETE",
  headers: { Authorization: `Bearer ${VISITORS_API_KEY}` },
});

const data = await res.json();

Response

{
  "hostnames": ["visitors.now"]
}