API

Create project

POSThttps://api.visitors.now/v1/projects

Creates a new project.

Request

index.ts
const res = await fetch("https://api.visitors.now/v1/projects", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${VISITORS_USER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "My Site",
    domain: "mysite.com",
  }),
});

const project = await res.json();

Body parameters

name

stringrequired

Display name of the project.

domain

stringrequired

The domain to track.

Response

Returns the created project.

{
  "id": "a3b1c2d4-5e6f-7890-abcd-ef1234567890",
  "name": "My Site",
  "domain": "mysite.com",
  "token": "c4d5e6f7-8901-2345-abcd-ef6789012345",
  "public": false,
  "currency": "USD",
  "createdAt": "2026-03-07T12:00:00.000Z",
  "updatedAt": "2026-03-07T12:00:00.000Z"
}