API Documentation
Access your analytics data programmatically via our REST API. All endpoints are served from https://api.weldpulse.org.
Authentication
All API requests require a Bearer token in the Authorization header. Create an API key in your project's API Keys settings. Each key is scoped to a single project — it can only access analytics for sites within that project.
curl https://api.weldpulse.org/v1/stats \ -H "Authorization: Bearer ak_live_your_api_key" \ -G -d "start=2024-01-01T00:00:00Z" \ -d "end=2024-01-31T23:59:59Z"
API access requires a Pro or Enterprise plan.
Rate Limits
API requests are rate limited to 100 requests per minute per API key. When the limit is exceeded, the API returns a 429 status code.
Error Responses
All errors return a JSON object with error and code fields.
{
"error": "Missing required parameters: start, end",
"code": "BAD_REQUEST"
}| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing or invalid parameters |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 403 | FORBIDDEN | No sites configured for the project |
| 429 | RATE_LIMITED | Too many requests (100/min limit) |
| 500 | INTERNAL_ERROR | Internal server error |
Endpoints
/v1/statsOverview statistics for the project
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangeResponse
{
"data": [{
"visitors": 1234,
"pageviews": 5678,
"sessions": 2345,
"avg_duration": 45.2,
"bounce_rate": 0.42
}]
}/v1/pagesTop pages ranked by visitors
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangelimitinteger— Max results (default: 10)Response
{
"data": [
{
"pathname": "/pricing",
"visitors": 456,
"pageviews": 890,
"avg_duration": 32.1,
"bounce_rate": 0.38
}
]
}/v1/referrersTraffic sources
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangelimitinteger— Max results (default: 10)Response
{
"data": [
{
"referrer_source": "Google",
"visitors": 320,
"pageviews": 580,
"bounce_rate": 0.45
}
]
}/v1/timeseriesTime-series data for charting
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangeintervalstring— Bucket interval (default: "1 hour")Response
{
"data": [
{
"t": "2024-01-15T00:00:00",
"visitors": 42,
"pageviews": 98,
"sessions": 56
}
]
}/v1/realtimeLive visitors in the last 5 minutes
Response
{
"data": [
{
"pathname": "/",
"country": "US",
"device_type": "desktop",
"referrer_source": "Google",
"current_visitors": 3
}
]
}/v1/eventsCustom event summaries
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangeResponse
{
"data": [
{
"event_name": "signup_click",
"total": 234,
"unique_visitors": 189
}
]
}/v1/geoGeographic breakdown by country and region
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangelimitinteger— Max results (default: 50)Response
{
"data": [
{
"country": "US",
"region": "California",
"visitors": 890,
"pageviews": 2100
}
]
}/v1/devicesDevice, browser, and OS breakdown
Parameters
startISO 8601required— Start of date rangeendISO 8601required— End of date rangelimitinteger— Max results (default: 50)Response
{
"data": [
{
"device_type": "desktop",
"browser": "Chrome",
"os": "macOS",
"visitors": 567,
"pageviews": 1200
}
]
}/v1/sitesList all sites in the project
Response
{
"data": [
{
"id": "uuid",
"domain": "example.com",
"name": "Main Site",
"site_key": "sk_live_...",
"is_active": true,
"created_at": "2024-01-01T00:00:00Z"
}
]
}Common Parameters
| Parameter | Type | Description |
|---|---|---|
| start | ISO 8601 | Start of date range (required for most endpoints) |
| end | ISO 8601 | End of date range (required for most endpoints) |
| limit | integer | Max results (default: 10 for pages/referrers, 50 for geo/devices) |
| interval | string | Timeseries interval, e.g. "1 hour", "1 day" (timeseries endpoint only) |