Authentication
Requires either:
- Session authentication (browser)
- API key with organization scope and
create permission
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 UTC
Make analytics dashboard publicly accessible. Defaults to false
Response
Returns the created website object.
Unique website identifier (use as clientId in tracking script)
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
id as your clientId
- See SDK Installation for implementation details