https://api.visitors.now/v1/projectUpdates the project associated with the API key used for authentication.
const res = await fetch("https://api.visitors.now/v1/project", {
method: "PATCH",
headers: {
Authorization: `Bearer ${VISITORS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "My Site",
currency: "EUR",
hostnames: ["mysite.com", "*.mysite.com"],
blockedIps: ["203.0.113.10", "198.51.100.0/24"],
blockedPathnames: ["/admin/*"],
maskedPathnames: ["/users/:id"],
}),
});
const project = await res.json();Display name of the project.
Whether the project dashboard is publicly accessible.
Currency used for revenue display.
Hostnames allowed to send tracking events. Wildcards like *.example.com are supported.
IP addresses or IPv4 CIDR ranges blocked from sending tracking events.
Pathnames blocked from being tracked. Wildcards like /admin/* are supported.
Pathname patterns aggregated in analytics output.
Returns the updated project object.
{
"id": "fe14d7a2-0f3f-4dc4-9c0b-6f4a49f5c751",
"name": "My Site",
"domain": "visitors.now",
"token": "b1a57b77-01f4-42e4-b7b4-1709b4d21d34",
"public": false,
"currency": "EUR",
"hostnames": ["mysite.com", "*.mysite.com"],
"blockedIps": ["203.0.113.10", "198.51.100.0/24"],
"blockedPathnames": ["/admin/*"],
"maskedPathnames": ["/users/:id"],
"createdAt": "2025-11-28T14:30:56.834Z",
"updatedAt": "2026-03-07T12:00:00.000Z"
}