API

List hostnames

GEThttps://api.visitors.now/v1/project/hostnames

Returns the hostnames allowed to send tracking events for the project.

Request

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

const data = await res.json();

Response

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