turbometrics offers a REST API for programmatic access to scans, domains and account data. Authentication works via bearer tokens, which you manage under Account → API & apps.
Reference: every endpoint with parameters, response schemas and error codes is listed in the API reference. The same description is available as OpenAPI 3.1 JSON for Postman, Insomnia or code generators;
GET /api/v1returns the entry points without a token.
Authentication
Add your API token to every request as an Authorization header:
Authorization: Bearer {your-token}
The API always responds with JSON. Without a valid token you get 401 Unauthenticated.
Base URL
https://turbometrics.io/api/v1
Rate limiting
The daily request limit depends on your plan:
| Plan | Daily limit |
|---|---|
| Starter | 1,000 |
| Pro | 5,000 |
| Agency | Unlimited |
If you exceed it, you get 429 Too Many Requests:
{
"error": "Daily API limit reached",
"limit": 1000,
"reset_at": "2026-04-01T23:59:59+02:00"
}
The counter is reset daily at midnight.
Reads from the official WordPress plugin (header x-turbometrics-client: wordpress-plugin/<version>) don't count toward the daily limit. This applies to GET /rum/sites, /rum/sites/{id}/summary, /history, /pages, /alerts and /breakdown. Instead they have their own limit of 300 requests per hour for each website and at most 3,000 per hour for each account; above it the API answers with 429.
The same applies to the plugin's reads of GET /attributions.
Endpoints
GET /me
Returns account information and the current API usage.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/me
Response:
{
"data": {
"id": 42,
"name": "John Doe",
"email": "[email protected]",
"plan": {
"key": "starter",
"label": "Starter",
"api_enabled": true,
"api_daily_limit": 1000
},
"api_usage": {
"used_today": 12,
"limit_today": 1000,
"reset_at": "2026-04-01T23:59:59+02:00"
}
}
}
GET /scans
Returns a paginated list of your scans.
Parameters:
| Parameter | Type | Description |
|---|---|---|
limit |
int | Results per page, max. 50 (default: 20) |
domain |
string | Filters by URL content |
status |
string | queued, running, finished, failed |
page |
int | Page number |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/scans?limit=10&status=finished"
Response:
{
"data": [
{
"public_id": "01KN3X...",
"report_url": "https://turbometrics.io/scan/01KN3X...",
"status": "finished",
"submitted_url": "https://example.com/",
"region": "de-fsn1",
"auth_type": null,
"requested_at": "2026-03-31T00:29:00+02:00",
"finished_at": "2026-03-31T00:29:45+02:00",
"result": {
"scores": {
"overall": 87,
"speed": 100,
"images": 93,
"caching": 89,
"wordpress": 100,
"technical": 70
}
}
}
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 143,
"last_page": 15
}
}
POST /scans
Starts a new scan.
Body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
url |
string | yes | The URL to scan |
region |
string | no | Scan location (e.g. de-fsn1, de-nbg1) |
public |
bool | no | Publicly visible (default: false) |
force |
bool | no | Force a fresh scan even if a recent result exists (default: false) |
keep |
bool | no | Keep the scan permanently: it is not deleted when your history period ends, and shared links stay valid. Counts against your plan's quota (see below, default: false) |
auth |
object | no | Authentication for protected pages (requires the Pro plan, see below) |
Note on caching: without force: true, an existing scan result for the same URL is returned if it is less than 24 hours old. The response then contains "cached": true and HTTP 200 instead of 202.
Example (normal scan):
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}' \
https://turbometrics.io/api/v1/scans
Example (force a fresh scan):
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "force": true}' \
https://turbometrics.io/api/v1/scans
Response – new scan (202 Accepted):
{
"data": {
"id": "01KN3X...",
"status": "queued",
"url": "https://example.com/",
"cached": false,
"auth_type": null
}
}
Response – cache hit (200 OK):
{
"data": {
"id": "01KN3X...",
"status": "finished",
"url": "https://example.com/",
"cached": true,
"auth_type": null
}
}
The scan is processed asynchronously. Call GET /scans/{id} to check the status.
Scan with authentication (Pro plan and above)
Pages protected by HTTP basic auth or by a custom HTTP header can be scanned with the optional auth object. Requires the Pro plan.
Fields in the auth object:
| Field | Type | Description |
|---|---|---|
type |
string | "basic" or "header" |
username |
string | User name (only with type: "basic") |
password |
string | Password (only with type: "basic") |
header_name |
string | Name of the HTTP header (only with type: "header") |
header_value |
string | Value of the HTTP header (only with type: "header") |
Example – HTTP basic auth:
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"url": "https://staging.example.com",
"auth": {
"type": "basic",
"username": "admin",
"password": "secret"
}
}' \
https://turbometrics.io/api/v1/scans
Example – HTTP header:
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"url": "https://staging.example.com",
"auth": {
"type": "header",
"header_name": "X-Preview-Key",
"header_value": "abc123"
}
}' \
https://turbometrics.io/api/v1/scans
Response with authentication:
{
"data": {
"id": "01KN3X...",
"status": "queued",
"url": "https://staging.example.com/",
"cached": false,
"auth_type": "basic"
}
}
The response contains auth_type as an indicator – credentials are never returned. Scans with authentication are automatically treated as private.
Without the scan_auth feature (Free / Starter), the auth object is rejected with 403 Forbidden.
GET /scans/{id}
Returns the details of a single scan.
{id} is the public_id (e.g. 01KN3X...).
report_url points to the report in the web interface. For private scans the link
only works for the signed-in owner – to pass a report on to someone else, use
share_url (see Share links).
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X...
Response (running scan):
{
"data": {
"public_id": "01KN3X...",
"report_url": "https://turbometrics.io/scan/01KN3X...",
"status": "running",
"submitted_url": "https://example.com/",
"region": "de-fsn1",
"auth_type": null,
"progress": {
"stage": "runtime_desktop",
"stage_started_at": "2026-03-31T00:29:12+02:00"
}
}
}
Response (finished scan):
{
"data": {
"public_id": "01KN3X...",
"report_url": "https://turbometrics.io/scan/01KN3X...",
"status": "finished",
"is_public": false,
"submitted_url": "https://example.com/",
"region": "de-fsn1",
"auth_type": null,
"progress": null,
"share_enabled": false,
"share_url": null,
"requested_at": "2026-03-31T00:29:00+02:00",
"finished_at": "2026-03-31T00:29:45+02:00",
"result": {
"final_url": "https://example.com/",
"final_host": "example.com",
"http_status": 200,
"scores": {
"overall": 87,
"speed": 100,
"images": 93,
"caching": 89,
"wordpress": 100,
"technical": 70
},
"summary_short": "The page loads quickly, but has room for improvement in technical metrics.",
"summary_long": "...",
"metrics": {
"ttfb_ms": 182,
"desktop": {
"fcp_ms": 412,
"lcp_ms": 830,
"cls": 0.02,
"tbt_ms": 0,
"request_count": 34,
"total_bytes": 512000
},
"mobile": {
"fcp_ms": 980,
"lcp_ms": 2100,
"cls": 0.04,
"tbt_ms": 120,
"request_count": 34,
"total_bytes": 512000
}
},
"screenshots": {
"desktop_url": "https://turbometrics.io/scan/01KN3X.../screenshot?profile=desktop",
"mobile_url": "https://turbometrics.io/scan/01KN3X.../screenshot?profile=mobile",
"filmstrip": {
"desktop": [
"https://turbometrics.io/scan/01KN3X.../strip/desktop/0?...",
"https://turbometrics.io/scan/01KN3X.../strip/desktop/1?..."
],
"mobile": [
"https://turbometrics.io/scan/01KN3X.../strip/mobile/0?..."
]
},
"filmstrip_frames": {
"desktop": [
{ "url": "https://turbometrics.io/scan/01KN3X.../strip/desktop/0?...", "ms": 0, "event": null },
{ "url": "https://turbometrics.io/scan/01KN3X.../strip/desktop/1?...", "ms": 850, "event": "lcp" }
],
"mobile": [
{ "url": "https://turbometrics.io/scan/01KN3X.../strip/mobile/0?...", "ms": 0, "event": "fcp" }
]
}
},
"findings": [
{
"category": "images",
"code": "unoptimized_images",
"severity": "warning",
"title": "Images not optimised",
"message": "3 images could be smaller.",
"recommendation": "Use WebP and compress images before upload."
}
],
"google_fonts": {
"status": "direct",
"fonts": [
{
"family": "opensans",
"name": "Open Sans",
"embed": false,
"source": { "kind": "theme", "name": "my-theme", "url": "https://example.com/wp-content/themes/my-theme/style.css" }
}
]
}
}
}
}
Progress (progress):
While a scan is queued or running, progress shows where it currently is. It is null once the scan has finished or failed.
progress.stage |
Meaning |
|---|---|
queued |
Waiting in the queue (stage_started_at is null) |
preflight |
Server response and headers |
html |
HTML analysis |
runtime_desktop |
Page load in a real browser on our server, desktop profile |
runtime_mobile |
Page load in a real browser on our server, mobile profile |
assets |
Analysis of the loaded files |
null |
Running, but no stage reported yet |
stage_started_at is an ISO-8601 timestamp, or null if unknown. Poll every few seconds, and do not rely on a fixed order of the stages beyond this list.
Google Fonts (result.google_fonts):
result.google_fonts is null for scans created before this field existed. Otherwise it contains the overall status and the detected fonts (at most 20).
result.preflight describes the server response: https, redirect_count, content_type, content_encoding, has_browser_caching, has_page_cache (signs of a page cache), page_cache_status, has_cdn, cdn, cache_control, server, http2 and http3. Unknown fields are left out. page_cache_status is hit when the measured response came from the page cache and miss when the page was built fresh, for example because an update cleared the cache. The server response of such a scan then measures PHP rather than the cache. Scans before 18 Nov 2026 do not have the field.
status |
Meaning |
|---|---|
direct |
Fonts are loaded directly from Google's servers |
embed_only |
Google fonts come only from embedded Google services such as Maps, YouTube or reCAPTCHA; the page itself loads none |
none |
No Google Fonts found |
unknown |
Could not be determined (e.g. no browser run) |
Each entry in fonts has family (font family), name, embed (true if the font comes from an embedded Google service such as Maps, YouTube or reCAPTCHA) and source. source.kind is plugin, theme, page, external or unknown; source.name and source.url name the origin and are null if unknown.
The check covers the first page load, before visitors have clicked anything in the cookie banner. It also shows up in findings:
code |
Severity | Meaning |
|---|---|---|
google_fonts_direct |
bad | Fonts are loaded directly from Google (parameters count, families) |
google_fonts_embed_only |
warning | Google fonts only via embedded services (Maps, YouTube, reCAPTCHA) |
google_fonts_none |
good | No Google Fonts found |
POST /scans/{id}/share/enable
Enables the share link for a scan and returns the public share URL. Requires at least the Starter plan.
{id} is the public_id of the scan (e.g. 01KN3X...).
Example:
curl -X POST \
-H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X.../share/enable
Response:
{
"data": {
"share_enabled": true,
"share_url": "https://turbometrics.io/s/abc123xyz012"
}
}
The token stays stable – enabling it again after disabling it uses the same URL.
POST /scans/{id}/share/disable
Disables the share link. The share token is kept internally, so that reactivating it later delivers the same URL.
Example:
curl -X POST \
-H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X.../share/disable
Response:
{
"data": {
"share_enabled": false
}
}
POST /scans/{id}/keep/enable
Marks a scan as kept permanently. It is no longer deleted when your plan's history period (history_days) ends, and an enabled share link stays valid. You get the same result when creating a scan with keep: true in POST /scans.
How many scans you can keep permanently depends on your plan:
| Plan | Permanent scans |
|---|---|
| Free | 0 |
| Starter | 3 |
| Pro | 10 |
| Agency | 50 |
If the quota is used up or not part of your plan, the API responds with HTTP 403 and an explanation in your language (parameter ?locale=de|en, otherwise your account's language setting). Enabling a scan that is already marked returns 200 even if the quota is full (idempotent). Removing the mark is always possible. After a downgrade, existing marks are kept, but new ones are blocked until there is room again.
{id} is the scan's public_id (e.g. 01KN3X...). A scan that belongs to someone else or does not exist returns 404.
Example:
curl -X POST \
-H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X.../keep/enable
Response:
{
"data": {
"keep_forever": true
}
}
POST /scans/{id}/keep/disable
Removes the mark. The scan is subject to your plan's history period again, and its slot in the quota is freed.
Example:
curl -X POST \
-H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X.../keep/disable
Response:
{
"data": {
"keep_forever": false
}
}
GET /domains
Returns a paginated list of your monitored scan targets.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/domains
Response:
{
"data": [
{
"id": 7,
"host": "example.com",
"url": "https://example.com/",
"schedule": "daily",
"is_active": true,
"last_dispatched_at": "2026-03-31T08:00:00+02:00"
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 5,
"last_page": 1
}
}
GET /domains/{id}/history
Returns the last 30 finished scans for a scan target.
{id} is the numeric ID from GET /domains.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/domains/7/history
Response:
{
"data": [
{
"score": 87,
"created_at": "2026-03-31T08:01:23+02:00",
"region": "de-fsn1"
},
{
"score": 84,
"created_at": "2026-03-30T08:00:55+02:00",
"region": "de-fsn1"
}
]
}
GET /alerts
Returns a paginated list of your alerts.
Parameters:
| Parameter | Type | Description |
|---|---|---|
status |
string | open (open, not dismissed), resolved, unread |
severity |
string | critical, warning |
limit |
int | Results per page, max. 50 (default: 20) |
page |
int | Page number |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/alerts?status=open&severity=critical"
Response:
{
"data": [
{
"id": 123,
"type": "score_below_threshold",
"severity": "critical",
"title": "Score below threshold",
"message": "Score 34 below the critical threshold of 60.",
"is_read": false,
"is_dismissed": false,
"url": "https://example.com/",
"host": "example.com",
"scan_id": "01KN3X...",
"diagnosis": null,
"created_at": "2026-03-31T08:01:23+02:00",
"resolved_at": null
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 3,
"last_page": 1
}
}
diagnosis is null, or {sentence, confidence, attribution_id} when the decline behind the alert can be linked to a change (same website, same metric, matching time; details via GET /attributions). This applies to alerts on score, LCP, TTFB and TBT and to live data alerts on LCP, FCP, TTFB, CLS and INP; other alerts always carry null.
GET /alerts/{id}
Returns a single alert.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/alerts/123
Response: the same structure as a single element from GET /alerts.
POST /alerts/mark-read
Marks alerts as read. Without ids, all unread alerts of the user are marked.
Body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
ids |
array | no | Array of alert IDs; missing → all |
Example (specific alerts):
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"ids": [123, 124]}' \
https://turbometrics.io/api/v1/alerts/mark-read
Example (mark all as read):
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{}' \
https://turbometrics.io/api/v1/alerts/mark-read
Response:
{
"data": {
"marked_read": 5
}
}
GET /rum/sites
Returns a paginated list of your live-data websites. Starter plan and above only.
Parameters:
| Parameter | Type | Description |
|---|---|---|
limit |
int | Results per page, max. 50 (default: 20) |
page |
int | Page number |
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/rum/sites
Response:
{
"data": [
{
"id": 1,
"domain": "turbometrics.io",
"active": true,
"embed_snippet": "<script src=\"https://turbometrics.io/tm.min.js\" data-site-id=\"...\" async></script>",
"pageviews_this_month": 988,
"monthly_limit": 1000000,
"created_at": "2026-04-01T00:00:00+02:00"
}
],
"meta": { "current_page": 1, "per_page": 20, "total": 2, "last_page": 1 }
}
GET /rum/sites/{id}
Returns the details of a single live-data website.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/rum/sites/1
GET /rum/sites/{id}/summary
Returns p75 values and the Core Web Vitals status for a website.
Parameters:
| Parameter | Type | Description |
|---|---|---|
period |
string | 24h, 7d, 30d (default: 24h) |
device |
string | all, desktop, mobile, tablet (default: all) |
path |
string | Optional: only measurements of this exact path, e.g. /pricing/ (must start with /, at most 2048 characters, otherwise 422) |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/rum/sites/1/summary?period=24h&device=all"
Response:
{
"data": {
"domain": "turbometrics.io",
"period": "24h",
"device": "all",
"path": null,
"cwv_pass": true,
"cwv_insufficient_data": false,
"metrics": {
"LCP": { "p75": 226, "rating": "good", "samples": 127 },
"CLS": { "p75": 0.0, "rating": "good", "samples": 12 },
"INP": { "p75": 112, "rating": "good", "samples": 16 },
"FCP": { "p75": 201, "rating": "good", "samples": 26 },
"TTFB": { "p75": 143, "rating": "good", "samples": 27 }
}
}
}
cwv_pass is true when all three Core Web Vitals (LCP, CLS, INP) are within the target range and each has at least 20 measurements. With too little data, cwv_pass is null and cwv_insufficient_data is true.
GET /rum/sites/{id}/history
Returns daily p75/p50 values for one metric as a time series.
Parameters:
| Parameter | Type | Description |
|---|---|---|
metric |
string | Required: LCP, CLS, INP, FCP, TTFB |
days |
int | 7, 30, 90 (default: 30) |
device |
string | all, desktop, mobile, tablet (default: all) |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/rum/sites/1/history?metric=LCP&days=30"
Response:
{
"data": [
{ "date": "2026-04-04", "p75": 226, "p50": 180, "samples": 127 },
{ "date": "2026-04-03", "p75": 240, "p50": 195, "samples": 98 }
],
"meta": { "metric": "LCP", "days": 30, "device": "all" }
}
GET /rum/sites/{id}/pages
Returns the slowest pages by p75 for one metric.
Parameters:
| Parameter | Type | Description |
|---|---|---|
metric |
string | LCP, INP, FCP, TTFB (default: LCP) |
period |
string | 24h, 7d (default: 24h) |
limit |
int | 1–100 (default: 25) |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/rum/sites/1/pages?metric=LCP&limit=10"
Response:
{
"data": [
{ "path": "/", "p75": 1437, "samples": 3 },
{ "path": "/preise", "p75": 98, "samples": 12 }
],
"meta": { "metric": "LCP", "period": "24h" }
}
GET /rum/sites/{id}/breakdown
Returns what slows down interactions (INP) and which JS errors occur, grouped by origin: plugin, theme, third party, WordPress core or your own site. Same data as the "Breakdown" tab of a live data website.
Parameters:
| Parameter | Type | Description |
|---|---|---|
days |
int | 7, 28 (default: 7) |
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/rum/sites/1/breakdown?days=7"
Response:
{
"data": {
"ready": true,
"days": 7,
"origins": [
{
"type": "plugin",
"key": "elementor",
"label": "Elementor",
"inp_share": 42.0,
"inp_count": 12,
"js_error_share": 3.1,
"js_error_pages": 17,
"js_error_message": "Uncaught TypeError: Cannot read properties of null"
}
]
}
}
ready is false while less than 80 % of the window was measured with the current snippet, which records slow scripts and JS errors; origins is empty then. inp_share is the share of interactions (in percent) slowed down by a script of this origin, js_error_share the share of page views with the most frequent JS error of this origin. Missing parts are null. Sorted by the larger of the two shares. Values are cached for 5 minutes.
GET /rum/sites/{id}/alerts
Returns the configured alerts for a live-data website.
Example:
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/rum/sites/1/alerts
Response:
{
"data": [
{
"id": 209,
"title": "turbometrics.io – Auto Alert",
"mode": "auto",
"metric": null,
"threshold": null,
"window_minutes": 60,
"min_samples": 20,
"consecutive_threshold": 2,
"status": "active",
"emailed_at": null,
"resolved_at": null,
"diagnosis": null,
"created_at": "2026-04-05T10:00:00+02:00"
}
]
}
Possible values for status: active (configured, never triggered), triggered (currently triggered), resolved (resolved).
diagnosis is only filled while triggered, otherwise null (same structure as in GET /alerts).
GET /changes
Returns the detected and reported changes of one website (plugins, theme, WordPress and PHP versions, third-party scripts, CDN, server, deploys), newest first. Counts toward the daily request limit like all read endpoints.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
host |
string | yes | The website's host, e.g. example.com (https:// and www. are ignored) |
since |
string | no | Only changes from this time on, ISO 8601; without an offset, UTC is assumed (default: the last 30 days; never earlier than your plan's history period) |
kind |
string | no | Only one kind of change, e.g. deploy or plugin_updated |
limit |
integer | no | 1 to 200 (default: 100) |
include_flaps |
boolean | no | 1 or true also returns switches that the next scan reversed again (default: hidden) |
An unknown host or one that does not belong to your account returns 404.
A switch that the very next scan reverses within 72 hours (for example a plugin that showed up in only one scan) is usually a detection artifact. Both entries are therefore left out of the response unless you set include_flaps=1; they stay stored.
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/changes?host=example.com&since=2026-11-01T00:00:00Z&kind=deploy"
Response:
{
"data": [
{
"id": 4711,
"host": "example.com",
"kind": "deploy",
"component": null,
"from": null,
"to": null,
"occurred_at": "2026-11-12T09:30:00+00:00",
"window_start": null,
"precision": "exact",
"sources": ["api"],
"label": "Release 2.4.0",
"external_ref": "a1b2c3d"
}
]
}
All times are ISO 8601 in UTC. precision is exact, day or between_scans (the change happened between two scans; window_start then marks the start of that window). sources lists where the change was seen.
GET /attributions
Returns the diagnoses of one website: declines in metrics that match a detected or reported change in time and in the measurements, newest first. Each entry stands for one event; if several declining metrics belong together (e.g. LCP and FCP after the same update), they appear together under metrics. Only declines are included; diagnoses you dismissed with "Dismiss diagnosis" never appear. Counts toward the daily request limit, except for reads from the WordPress plugin (see Rate limiting).
Correlation, not proof: a diagnosis shows which change fits the decline in time and in the measurements. Whether it is the cause is best checked with the before/after comparison of the two scans.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
host |
string | yes | The website's host, e.g. example.com (https:// and www. are ignored) |
since |
string | no | Only events that started from this time on, ISO 8601; without an offset, UTC is assumed (default: the last 30 days; never earlier than your plan's history period) |
status |
string | no | open (the decline persists, default), recovered (the values have recovered) or all |
An unknown host or one that does not belong to your account returns 404. Every request only returns diagnoses for the requested host, even if your account holds many websites.
Example:
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/attributions?host=example.com&status=all"
Response:
{
"data": [
{
"id": 812,
"started_at": "2026-11-12T10:00:00+00:00",
"confidence": "high",
"status": "open",
"sentence": "Main content mobile 1.20 s → 2.80 s (+133%). Likely cause: Elementor updated (3.24.0 → 3.25.1).",
"metrics": [
{"metric": "lcp", "device": "mobile", "before": 1200, "after": 2800, "change_pct": 1.333},
{"metric": "fcp", "device": "mobile", "before": 900, "after": 1300, "change_pct": 0.444}
],
"suspects": [
{"change_id": 4711, "kind": "plugin_updated", "component": "elementor", "from": "3.24.0", "to": "3.25.1", "occurred_at": "2026-11-12T05:00:00+00:00"}
],
"compare": {"before_scan_id": "01KN3W...", "after_scan_id": "01KN3X..."}
}
]
}
ididentifies the diagnosis; alerts refer to it withdiagnosis.attribution_id.confidenceishigh(likely cause),medium(possibly related) orlow(several changes could explain it).sentenceis the diagnosis sentence in the API language (locale).metricslists, for each metric (lcp,fcp,ttfb,tbt,cls,inp,score,js_errors) and device (mobile,desktop,all), the value before and after;change_pctis the relative change (0.5= +50%). Times in milliseconds, CLS without a unit,js_errorsas the percentage of page views with JavaScript errors (live data, always deviceall).suspectsholds the suspected change forhighandmedium, and all candidates forlow, without a ranking.change_idis theidfromGET /changes.comparenames the two scans for the before/after comparison (IDs as inGET /scans/{id}), otherwisenull.- Scans from an empty page cache (
page_cache_status=miss, seeGET /scans/{id}) do not count when the same page is otherwise served from the cache. An update that only clears the cache therefore does not create a diagnosis.
POST /changes
Reports changes yourself, for example a deploy. Reports are limited to 120 requests per hour for each user and website and 60 per minute for each account, and they do not count toward the daily request limit. Reported changes trigger a free scan: at the earliest 5 minutes after the last reported change, once the queue is free, up to 5 of the domain's monitored URLs are scanned (the homepage if there are none), at most 6 rounds per domain and day. This scan does not count against your limits.
Body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
host |
string | yes | The website's host. It must belong to your account (a scan, a live-data website or a domain), otherwise 422 |
source |
string | no | api (default), wp_plugin or turbopress_cockpit |
changes |
array | yes | 1 to 50 entries |
changes[].kind |
string | yes | Kind of change: plugin_updated, plugin_added, plugin_removed, plugin_activated, plugin_deactivated, theme_updated, theme_switched, wordpress_updated, php_changed, third_party_added, third_party_removed, assets_changed, server_changed, cache_config_changed, deploy, custom, platform_updated, resource_broken, lcp_image_changed |
changes[].component |
string | no | Affected component, e.g. a plugin slug (up to 100 characters) |
changes[].from, to |
string | no | Version or value before and after (up to 100 characters) |
changes[].occurred_at |
string | no | ISO 8601; without an offset, UTC is assumed. Default: now. At most 5 minutes in the future and at most 30 days back |
changes[].label |
string | no | Short description, e.g. a release name (up to 200 characters) |
changes[].external_ref |
string | no | Your own reference, e.g. a commit hash (up to 100 characters) |
changes[].meta |
object | no | Further details, at most 2 KB as JSON |
Control characters are removed from texts, and longer texts are shortened (except external_ref, which is rejected with 422 above 100 characters). Times without an offset count as UTC.
Example (deploy report):
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"host": "example.com",
"changes": [
{
"kind": "deploy",
"label": "Release 2.4.0",
"external_ref": "a1b2c3d",
"occurred_at": "2026-11-12T09:30:00Z",
"meta": {"url": "https://git.example.com/acme/shop/commit/a1b2c3d"}
}
]
}' \
https://turbometrics.io/api/v1/changes
Response (201): data contains the stored changes in the same format as GET /changes. If a change was already detected by a scan, it is merged with your report into one entry, and the more precise time wins.
If several installations of the WordPress plugin report for the same website (for example a staging copy with the same token), turbometrics keeps only the reports of the installation whose server the domain points to. Reports from the other installation (source = wp_plugin) are answered with the usual status code and an empty data, plus the field "ignored": "foreign_installation"; they are not stored and trigger no scan. Other sources are never held back.
POST /inventory
Reports the current state of a WordPress site (versions, theme, plugins). turbometrics compares it with the last reported state and records the differences as changes. The first report only stores the state. These requests are limited like POST /changes (120 per hour for each user and website, 60 per minute for each account) and do not count toward the daily request limit. Reported changes trigger the same free scan as with POST /changes.
Body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
host |
string | yes | The website's host (must belong to your account, otherwise 422) |
source |
string | yes | wp_plugin or turbopress_inventory |
reported_at |
string | no | ISO 8601; without an offset, UTC is assumed. Default: now. Same bounds as changes[].occurred_at: at most 5 minutes in the future, at most 30 days back |
facts.wordpress |
string | no | WordPress version |
facts.php |
string | no | PHP version |
facts.theme |
string | no | Slug of the active theme |
facts.page_cache |
bool | no | Whether a page cache is active |
facts.plugins |
array | no | Up to 500 entries {slug, version, active} |
facts.themes |
array | no | Up to 100 entries {slug, version, active} |
Facts you leave out are not compared and stay unchanged in the stored state (a report without plugins therefore removes no plugins). A slug consists of letters, digits, dots, underscores and hyphens, starts with a letter or digit, contains at least one letter and is at most 100 characters long. Versions are at most 100 characters long.
Example:
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"host": "example.com",
"source": "turbopress_inventory",
"facts": {
"wordpress": "6.6.2",
"php": "8.3.12",
"theme": "astra",
"plugins": [
{"slug": "elementor", "version": "3.25.1", "active": true},
{"slug": "wordpress-seo", "version": "23.5", "active": true}
],
"themes": [
{"slug": "astra", "version": "4.8.1", "active": true}
]
}
}' \
https://turbometrics.io/api/v1/inventory
Response (200): data.changes lists the changes found compared with the last report (empty on the first report or without differences). If the report was held back as coming from a foreign plugin installation (see POST /changes), data.changes is empty and the response carries "ignored": "foreign_installation".
Error codes
| Code | Meaning |
|---|---|
| 401 | No token or an invalid one |
| 403 | The plan does not support the API (Starter or higher needed) – or an auth object was passed without a Pro plan |
| 404 | Resource not found |
| 422 | Validation error (e.g. an invalid URL) |
| 429 | Hourly scan limit or daily API limit exceeded; for POST /changes and POST /inventory, the report limit (120 per hour for each website, 60 per minute for each account) |
| 500 | Internal error |
Example 422:
{
"message": "The url field is required.",
"errors": {
"url": ["The url field is required."]
}
}
Code examples
curl
# Start a scan
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "region": "de-fsn1"}' \
https://turbometrics.io/api/v1/scans
# Scan with HTTP basic auth (Pro plan and above)
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://staging.example.com", "auth": {"type": "basic", "username": "admin", "password": "secret"}}' \
https://turbometrics.io/api/v1/scans
# Scan with an HTTP header (Pro plan and above)
curl -X POST \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://staging.example.com", "auth": {"type": "header", "header_name": "X-Preview-Key", "header_value": "abc123"}}' \
https://turbometrics.io/api/v1/scans
# Check the status
curl -H "Authorization: Bearer {token}" \
https://turbometrics.io/api/v1/scans/01KN3X...
# The last 5 scans
curl -H "Authorization: Bearer {token}" \
"https://turbometrics.io/api/v1/scans?limit=5&status=finished"
PHP
$token = 'your-api-token';
$base = 'https://turbometrics.io/api/v1';
// Start a scan
$ch = curl_init("$base/scans");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['url' => 'https://example.com']),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
$scanId = $response['data']['id']; // e.g. "01KN3X..."
// Start a scan with HTTP basic auth (Pro plan and above)
$ch = curl_init("$base/scans");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://staging.example.com',
'auth' => [
'type' => 'basic',
'username' => 'admin',
'password' => 'secret',
],
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
// auth_type in the response shows "basic"; credentials are never returned
echo $response['data']['auth_type']; // "basic"
// Check the status
$ch = curl_init("$base/scans/$scanId");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token,
'Accept: application/json',
],
]);
$scan = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $scan['data']['status']; // queued | running | finished | failed
Rather not write code? Use the MCP server
If you prefer to query scans, alerts and live data in natural language, you can connect turbometrics directly to Claude Desktop and other AI tools – without writing your own API calls.
Connecting apps (OAuth 2.1)
The sections above describe access to your own account using a token you created yourself. If you are building an application that acts on behalf of other turbometrics users, there has been a second route since August 2026: OAuth 2.1. The user clicks “Allow” once and never has to copy a token.
The access token issued is an ordinary bearer token and works against all endpoints described above – not just the MCP server.
| Document | Address |
|---|---|
| Authorization server | https://turbometrics.io/.well-known/oauth-authorization-server |
| Registration | POST https://turbometrics.io/oauth/register |
| Authorisation | https://turbometrics.io/oauth/authorize |
| Token | POST https://turbometrics.io/oauth/token |
What you need to know:
- PKCE with
S256is mandatory. Requests without acode_challengeare refused. - Public clients, no secret. Your app registers itself via the registration endpoint (RFC 7591) or identifies itself through a Client ID Metadata Document.
- Redirect URIs must use
https– orhttpon a loopback address, for applications that open a local port. - Access tokens are valid for one hour, refresh tokens for 30 days. Refresh tokens rotate: each renewal gives you a new one and retires the old one.
- The user needs at least the Starter plan and will see your app under Account → API & apps, where access can be revoked at any time.
No OpenID Connect: there is no id_token and no userinfo endpoint. For
“who is this?”, call GET /api/v1/me after signing in.
Token management
You create and manage API tokens under Account → API & apps:
- Give every token a descriptive name (e.g.
Monitoring-Script,CI/CD) - Set an expiry date for security-critical environments
- The token value is shown only once after creation
- Delete compromised tokens immediately and create new ones