https://api.visitors.now/v1/project/hostnamesAdds a hostname that can send tracking events for the project.
const res = await fetch("https://api.visitors.now/v1/project/hostnames", {
method: "POST",
headers: {
Authorization: `Bearer ${VISITORS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
hostname: "*.visitors.now",
}),
});
const data = await res.json();Hostname to allow. Wildcards like *.example.com are supported.
{
"hostnames": ["visitors.now", "*.visitors.now"]
}