API Endpoints
Complete reference for all Pipetrace API endpoints.
Sites
List Sites
GET /api/v1/sitesReturns all sites for the authenticated user.
Get Site
GET /api/v1/sites/:siteIdCreate Site
POST /api/v1/sites
{
"domain": "example.com",
"name": "My Website"
}Update Site
PATCH /api/v1/sites/:siteId
{
"name": "Updated Name"
}Delete Site
DELETE /api/v1/sites/:siteIdAnalytics
Overview
GET /api/v1/sites/:siteId/analytics/overview?period=7dReturns aggregate statistics for the period.
{
"data": {
"visitors": 1234,
"pageviews": 5678,
"bounceRate": 45.2,
"avgDuration": 180,
"visitorsChange": 12.5,
"pageviewsChange": 8.3
}
}Time Series
GET /api/v1/sites/:siteId/analytics/timeseries?period=7dReturns data points for charts.
Top Pages
GET /api/v1/sites/:siteId/analytics/pages?period=7d&limit=10Top Sources
GET /api/v1/sites/:siteId/analytics/sources?period=7d&limit=10Devices
GET /api/v1/sites/:siteId/analytics/devices?period=7dBrowsers
GET /api/v1/sites/:siteId/analytics/browsers?period=7dLive Count
GET /api/v1/sites/:siteId/analytics/liveReturns the number of visitors in the last 5 minutes.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
period | string | One of: 24h, 7d, 30d, 90d |
limit | number | Max results to return (default: 10, max: 100) |
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 204 | No Content (successful delete) |
| 400 | Bad Request (validation error) |
| 401 | Unauthorized (missing/invalid token) |
| 404 | Not Found |
| 429 | Too Many Requests (rate limited) |
| 500 | Internal Server Error |