Create Project
curl --request POST \
--url https://api.example.com/websites/create \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"domain": "<string>",
"name": "<string>",
"timezone": "<string>",
"publicAccess": true
}
'{
"id": "<string>",
"domain": "<string>",
"name": "<string>",
"organizationId": "<string>",
"timezone": "<string>",
"publicAccess": true,
"trackingStatus": "<string>",
"createdAt": "<string>"
}Projects API
Create Project
Creates a new website (project) for analytics tracking
POST
/
websites
/
create
Create Project
curl --request POST \
--url https://api.example.com/websites/create \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"domain": "<string>",
"name": "<string>",
"timezone": "<string>",
"publicAccess": true
}
'{
"id": "<string>",
"domain": "<string>",
"name": "<string>",
"organizationId": "<string>",
"timezone": "<string>",
"publicAccess": true,
"trackingStatus": "<string>",
"createdAt": "<string>"
}Authentication
Requires either:- Session authentication (browser)
- API key with organization scope and
createpermission
Request Body
Organization ID to create the website under
Website domain (e.g.,
example.com or app.example.com)Display name for the website. Defaults to domain if not provided
IANA timezone identifier (e.g.,
America/New_York). Defaults to UTCMake analytics dashboard publicly accessible. Defaults to
falseResponse
Returns the created website object.Unique website identifier (use as
clientId in tracking script)Website domain
Display name
Parent organization ID
IANA timezone identifier
Public dashboard access flag
Initial tracking status (typically
setup_required)ISO 8601 timestamp of creation
Example Request
curl -X POST https://api.databuddy.cc/websites/create \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123",
"domain": "example.com",
"name": "My Website",
"timezone": "America/Los_Angeles"
}'
Example Response
{
"id": "web_new456",
"organizationId": "org_abc123",
"domain": "example.com",
"name": "My Website",
"timezone": "America/Los_Angeles",
"publicAccess": false,
"trackingStatus": "setup_required",
"createdAt": "2024-03-01T16:45:00Z"
}
Next Steps
After creating a website:- Install the tracking script using the returned
idas yourclientId - See SDK Installation for implementation details
⌘I