Page-view totals
Total page views today, over the last 7 and 30 days, and all time.
https://studiobuddy.radioworkflow.com/api/v1/analytics/summaryanalytics:readRead-only: calling it changes nothing on the site. Also available to AI assistants as the get-analytics-summary tool on the MCP server.
Four running totals in one call, for a dashboard tile or a daily report. Every window ends today and includes it, and days are bucketed in UTC, the same as the daily series.
Before a site's first visitor, or where page-view collection is not wired up yet, every total is 0 rather than an error.
Authentication
| Header | Required | Value |
|---|---|---|
| Authorization | Required | Bearer wb_live_your_key_here The site API key as a bearer token: Bearer wb_live_…. It is the only credential. There are no cookies, no session and no CSRF token in this API. |
The key must also carry the analytics:read scope. Scopes are ticked when a key is created (under Developers, API keys or on the site's API tab) and cannot be added afterwards. A key without this one answers insufficient_scope to this endpoint however many times it is retried, so the fix is a new key. What each scope unlocks.
Parameters
This endpoint takes no query parameters and no request body.
Request
curl 'https://studiobuddy.radioworkflow.com/api/v1/analytics/summary' \ -H "Authorization: Bearer wb_live_your_key_here"
Try it
This form calls /api/v1/analytics/summary from your browser, straight to the API, on this same origin. The key you paste below is put into an Authorization header on that one request. It is not sent to the documentation, not written to storage on this device, and not kept once you close the tab.
It is a real request against a real key: it counts against the same limit as any other call (120 per minute per key), and it appears in your site's API log like anything else you send.
A live key for the site, carrying the analytics:read scope.
GET /api/v1/analytics/summary Authorization: Bearer wb_live_your_key_here
The placeholder above is what the docs print. Your key is never shown back to you here, in the preview or in the response.
Response
application/jsonA JSON object.| Field | Type | Description |
|---|---|---|
| today | integer | Views so far today (UTC). |
| last_7_days | integer | Views over today and the six days before it. |
| last_30_days | integer | Views over today and the 29 days before it. |
| all_time | integer | Every view ever recorded for the site. |
Each window includes today, in UTC. The four totals are read in one query, so they are consistent with each other.
{
"today": 214,
"last_7_days": 1023,
"last_30_days": 4410,
"all_time": 38812
}Every response also carries the headers listed under what every response carries.
Errors
| HTTP | code | Retry? | What to do |
|---|---|---|---|
| 401 | unauthorized | Do not | Check the header is exactly Authorization: Bearer wb_live_…. If it is, the key was probably revoked: mint a new one under Developers, API keys in the console. Do not retry, because nothing about this request will succeed on a second attempt. |
| 403 | insufficient_scope | Do not | Mint a new key with the required scope ticked (Developers, API keys in the console, or the site's API tab), then revoke the old one. Do not retry: the same key answers 403 forever. The message names the scope that was missing. |
| 429 | rate_limited | Retry | Back off and retry. The window is at most 60 seconds long, so an exponential backoff starting around a second will clear it. If you hit this steadily, cache the responses you poll rather than raising your request rate. If the message mentions failed authentications, fix the key first: retrying the same bad token is what filled that bucket. |
| 500 | internal_error | Retry | Retry once after a short delay. If it persists for a given endpoint, it is a bug on our side rather than something your request can fix; report it with the endpoint and the time. |
What each code means, and the envelope they arrive in, are on the errors page.