Metrics API
GET /v1/metrics
Section titled “GET /v1/metrics”Read the workspace's loader deliveries, impressions, submissions and submission rate, with the source and trust of each
Operation getMetrics. Scopes: metrics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string | no | Start of the window (inclusive), RFC 3339. Default: 7 days (day) or 24 hours (hour) before to. Not older than the days the plan keeps the daily metrics (metricsRetentionDays: 365, 730 or 1095), or 90 days for hour buckets. |
to |
query | string | no | End of the window (exclusive), RFC 3339. Default: now. |
granularity |
query | one of hour, day | no | Bucket width: hour (window of at most 7 days, read from the last 90 days) or day (window of at most the plan's metricsRetentionDays). Default day. |
group_by |
query | one of site, component, version, country, device, hostname, event | no | Break the numbers down by site, component, version, country, device, hostname or event. Submissions are cut by site, component and version; loader deliveries by site; browser events by site, country (two letters, as the platform reports it), device (mobile, desktop, tablet or other), hostname and event (the name of a track event). A metric a breakdown cannot cut is null per group, and a group of the last four has totals and no series. The group unknown holds the events that carried no value. |
site_id |
query | string | no | Only this site of your workspace; another workspace's id is a 404. |
component_id |
query | string | no | Only this component of your workspace: its submissions and its browser events (impressions and track events, matched by the component's tag). Loader deliveries carry no component and are null. Another workspace's id is a 404. |
version_id |
query | string | no | Only the submissions of this version of your workspace; loader deliveries and browser events cannot be cut by version and are null. Another workspace's id, or a version of another component than component_id, is a 404. |
environment |
query | one of production, staging | no | Which sites: production (default) or staging. |
Responses
| Status | Meaning | Content type |
|---|---|---|
200 |
The window, bucket by bucket, with totals and (with group_by) groups. A null value is "no data", never zero; metrics says which metric has a source and how far to trust it. |
application/json |
400 |
validation_failed: a value outside its list, from not before to, a window longer than the bucket width allows (7 days of hour, the plan's metricsRetentionDays of day), from older than the days kept (the plan's metricsRetentionDays, 90 for hour), or a group_by=site that would pass the row limit (see errors[]). |
application/problem+json |
401 |
unauthenticated: no credentials, or credentials that prove nothing. |
application/problem+json |
403 |
insufficient_scope: the credential lacks a scope this route needs (see missing_scopes). permission_denied: the current workspace role does not allow the action. oauth_consent_required: an OAuth token whose person has not yet chosen the workspace and the permissions (see consent_url). mfa_required: a portal session that must still verify or set up MFA (see mfa_reason). workspace_suspended: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. |
application/problem+json |
404 |
not_found: site_id is not a live site of the caller's workspace in this environment, component_id is not a component of the caller's workspace, or version_id is not a version of it (of that component, when both are given). Another workspace's id is always this 404. |
application/problem+json |
405 |
method_not_allowed: the path exists, but not for this method; Allow lists the methods it answers. |
application/problem+json |
429 |
rate_limited: the limit of the route class (rate_limit.limit_class: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait Retry-After seconds. rate_limiter_unavailable (503) is answered for heavy routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). |
application/problem+json |
500 |
internal_error (nothing about the failure; quote request_id) or configuration_error. |
application/problem+json |
503 |
database_unavailable: the API could not reach its database (timeout, dropped connection). Wait Retry-After seconds and send the same request again: repeating is safe with the same Idempotency-Key; without it a POST may already have been applied. |
application/problem+json |
curl "https://api.taggor.dev/v1/metrics" \ -H "Authorization: Bearer $TAGGOR_API_KEY"const response = await fetch("https://api.taggor.dev/v1/metrics", { headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },});if (!response.ok) throw new Error(await response.text());const result: unknown = await response.json();console.log(result);GET /v1/metrics/export
Section titled “GET /v1/metrics/export”Download one site's daily metrics as CSV or NDJSON
Streams one row per UTC day: day, site_id, loader_deliveries (trust forgeable, not a verified impression) and submissions (trust counted); an empty CSV cell or a JSON null is "no data", never zero. Days come from the Analytics Engine while it holds them and from the daily aggregates after that, as in GET /v1/metrics. Aggregates only: no visitor data.
Operation exportMetrics. Scopes: metrics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
format |
query | one of csv, ndjson | no | File format: csv (default) or ndjson. |
site_id |
query | string | yes | The site to export (required); another workspace's id is a 404. |
from |
query | string | no | First day (inclusive), RFC 3339, cut to the UTC day. Default: 30 days before to. Not older than the days your plan keeps metrics. |
to |
query | string | no | End of the window (exclusive), RFC 3339. Default: now. |
environment |
query | one of production, staging | no | Which sites: production (default) or staging. |
Responses
| Status | Meaning | Content type |
|---|---|---|
200 |
The file, as an attachment. | text/csv, application/x-ndjson |
400 |
validation_failed: from not before to, or older than the days your plan keeps metrics (see errors[]). |
application/problem+json |
401 |
unauthenticated: no credentials, or credentials that prove nothing. |
application/problem+json |
403 |
insufficient_scope: the credential lacks a scope this route needs (see missing_scopes). permission_denied: the current workspace role does not allow the action. oauth_consent_required: an OAuth token whose person has not yet chosen the workspace and the permissions (see consent_url). mfa_required: a portal session that must still verify or set up MFA (see mfa_reason). workspace_suspended: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. |
application/problem+json |
404 |
not_found: site_id is not a live site of the caller's workspace in this environment. |
application/problem+json |
405 |
method_not_allowed: the path exists, but not for this method; Allow lists the methods it answers. |
application/problem+json |
429 |
rate_limited: the limit of the route class (rate_limit.limit_class: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait Retry-After seconds. rate_limiter_unavailable (503) is answered for heavy routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). |
application/problem+json |
500 |
internal_error (nothing about the failure; quote request_id) or configuration_error. |
application/problem+json |
503 |
database_unavailable: the API could not reach its database (timeout, dropped connection). Wait Retry-After seconds and send the same request again: repeating is safe with the same Idempotency-Key; without it a POST may already have been applied. |
application/problem+json |
curl "https://api.taggor.dev/v1/metrics/export?site_id=st_0123456789abcdefghjkmnpqrs" \ -H "Authorization: Bearer $TAGGOR_API_KEY"const response = await fetch("https://api.taggor.dev/v1/metrics/export?site_id=st_0123456789abcdefghjkmnpqrs", { headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },});if (!response.ok) throw new Error(await response.text());const result = await response.text();console.log(result);GET /v1/metrics/parameters
Section titled “GET /v1/metrics/parameters”Read the free parameters of the workspace's browser events, summed by value
Components send events with free parameters (track('plan-selected', { selectedPlan: 'yearly' })); this sums the events by the value of each parameter and filters by event, parameter or value. The values are the customer's own and are never interpreted. Technical limits only: values are at most 100 characters, an event carries at most 25 parameters, and past 100 distinct values of one parameter the rest is folded into (other). Source component_events, trust forgeable.
Operation getMetricParameters. Scopes: metrics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string | no | Start of the window (inclusive), RFC 3339. Default: 7 days (day) or 24 hours (hour) before to. Not older than the days the plan keeps the daily metrics (metricsRetentionDays: 365, 730 or 1095), or 90 days for hour buckets. |
to |
query | string | no | End of the window (exclusive), RFC 3339. Default: now. |
site_id |
query | string | no | Only this site of your workspace; another workspace's id is a 404. |
component_id |
query | string | no | Only the events of this component; another workspace's id finds nothing. |
event |
query | string | no | Only the events with this name (the name given to track). |
parameter |
query | string | no | Only this parameter, by name (letters, digits and _). |
value |
query | string (up to 100 characters) | no | Only this value of the parameter, an exact match. It is applied before the fold into (other) (past the 100 values kept apart per parameter), so a value that would be folded is found by its own name within the rows the read returned; truncated: true means the window had more rows than one read returns. |
environment |
query | one of production, staging | no | Which sites: production (default) or staging. |
Responses
| Status | Meaning | Content type |
|---|---|---|
200 |
The parameters of the window with the events per value. available: false says why there is nothing (never zero). |
application/json |
400 |
validation_failed: from not before to, a window longer than 90 days, from older than 90 days, or a name outside its pattern (see errors[]). |
application/problem+json |
401 |
unauthenticated: no credentials, or credentials that prove nothing. |
application/problem+json |
403 |
insufficient_scope: the credential lacks a scope this route needs (see missing_scopes). permission_denied: the current workspace role does not allow the action. oauth_consent_required: an OAuth token whose person has not yet chosen the workspace and the permissions (see consent_url). mfa_required: a portal session that must still verify or set up MFA (see mfa_reason). workspace_suspended: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. |
application/problem+json |
404 |
not_found: site_id is not a live site of the caller's workspace in this environment (also another workspace's). |
application/problem+json |
405 |
method_not_allowed: the path exists, but not for this method; Allow lists the methods it answers. |
application/problem+json |
429 |
rate_limited: the limit of the route class (rate_limit.limit_class: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait Retry-After seconds. rate_limiter_unavailable (503) is answered for heavy routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). |
application/problem+json |
500 |
internal_error (nothing about the failure; quote request_id) or configuration_error. |
application/problem+json |
503 |
database_unavailable: the API could not reach its database (timeout, dropped connection). Wait Retry-After seconds and send the same request again: repeating is safe with the same Idempotency-Key; without it a POST may already have been applied. |
application/problem+json |
curl "https://api.taggor.dev/v1/metrics/parameters" \ -H "Authorization: Bearer $TAGGOR_API_KEY"const response = await fetch("https://api.taggor.dev/v1/metrics/parameters", { headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },});if (!response.ok) throw new Error(await response.text());const result: unknown = await response.json();console.log(result);{ "workspace_id": "ws_0123456789abcdefghjkmnpqrs", "start_at": "2026-11-03T00:00:00.000Z", "end_at": "2026-11-10T00:00:00.000Z", "environment": "production", "computed_at": "2026-11-10T12:00:00.000Z", "available": true, "reason": null, "truncated": false, "parameters": [ { "event": "plan-selected", "parameter": "selectedPlan", "total": 64, "values": [ { "value": "yearly", "events": 40, "other": false }, { "value": "monthly", "events": 22, "other": false }, { "value": "(other)", "events": 2, "other": true } ] } ]}GET /v1/components/{component_id}/errors
Section titled “GET /v1/components/{component_id}/errors”List the runtime errors of a component grouped by stack, with source positions, the most recently seen first
Operation listComponentErrors. Scopes: metrics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
component_id |
path | string | yes | Public component id. |
limit |
query | integer (1 to 100, default 20) | no | Page size, 1 to 100. |
cursor |
query | string | no | Opaque next_cursor of the previous page, for the same list and filters. Omit for the first page. |
from |
query | string | no | Start of the window (inclusive), RFC 3339. Default: 24 hours before to. Not older than 30 days. |
to |
query | string | no | End of the window (exclusive), RFC 3339. Default: now. |
version_id |
query | string | no | Only this version of the component (default: its 100 newest). |
environment |
query | one of production, staging | no | Which sites: production (default) or staging. |
Responses
| Status | Meaning | Content type |
|---|---|---|
200 |
One page of the error groups of the window, the most recently seen first (at most 100 groups are read for a window: narrow it with from, to or version_id to see older ones). An empty page is also what an events store that could not be read looks like: available of the summary says which. |
application/json |
400 |
validation_failed: from not before to, a window over 30 days or from older than 30 days (see errors[]); on the list also a bad limit, and invalid_cursor. |
application/problem+json |
401 |
unauthenticated: no credentials, or credentials that prove nothing. |
application/problem+json |
403 |
insufficient_scope: the credential lacks a scope this route needs (see missing_scopes). permission_denied: the current workspace role does not allow the action. oauth_consent_required: an OAuth token whose person has not yet chosen the workspace and the permissions (see consent_url). mfa_required: a portal session that must still verify or set up MFA (see mfa_reason). workspace_suspended: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. |
application/problem+json |
404 |
not_found: no component with this id in the caller's workspace. |
application/problem+json |
405 |
method_not_allowed: the path exists, but not for this method; Allow lists the methods it answers. |
application/problem+json |
429 |
rate_limited: the limit of the route class (rate_limit.limit_class: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait Retry-After seconds. rate_limiter_unavailable (503) is answered for heavy routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). |
application/problem+json |
500 |
internal_error (nothing about the failure; quote request_id) or configuration_error. |
application/problem+json |
503 |
database_unavailable: the API could not reach its database (timeout, dropped connection). Wait Retry-After seconds and send the same request again: repeating is safe with the same Idempotency-Key; without it a POST may already have been applied. |
application/problem+json |
curl "https://api.taggor.dev/v1/components/cmp_0123456789abcdefghjkmnpqrs/errors" \ -H "Authorization: Bearer $TAGGOR_API_KEY"const response = await fetch("https://api.taggor.dev/v1/components/cmp_0123456789abcdefghjkmnpqrs/errors", { headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },});if (!response.ok) throw new Error(await response.text());const result: unknown = await response.json();console.log(result);{ "data": [ { "version_id": "ver_0123456789abcdefghjkmnpqrs", "semver": "1.1.0", "kind": "render", "hash": "3f9a1c2b7d4e55", "count": 7, "first_seen_at": "2026-11-11T10:00:00.000Z", "last_seen_at": "2026-11-11T11:30:00.000Z", "message": "Cannot read properties of undefined (reading 'title')", "symbolicated": true, "frames": [ { "generated_line": 1, "generated_column": 2345, "source": "src/hero.tsx", "line": 18, "column": 12, "name": "Hero" } ] } ], "next_cursor": null, "has_more": false}GET /v1/components/{component_id}/errors/summary
Section titled “GET /v1/components/{component_id}/errors/summary”Read the error rate of each version of a component and how far to trust the errors
Operation getComponentErrorSummary. Scopes: metrics:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
component_id |
path | string | yes | Public component id. |
from |
query | string | no | Start of the window (inclusive), RFC 3339. Default: 24 hours before to. Not older than 30 days. |
to |
query | string | no | End of the window (exclusive), RFC 3339. Default: now. |
version_id |
query | string | no | Only this version of the component (default: its 100 newest). |
environment |
query | one of production, staging | no | Which sites: production (default) or staging. |
Responses
| Status | Meaning | Content type |
|---|---|---|
200 |
error_rate (errors / mounts) per version in the window. available: false means the events store could not be read. |
application/json |
400 |
validation_failed: from not before to, a window over 30 days or from older than 30 days (see errors[]); on the list also a bad limit, and invalid_cursor. |
application/problem+json |
401 |
unauthenticated: no credentials, or credentials that prove nothing. |
application/problem+json |
403 |
insufficient_scope: the credential lacks a scope this route needs (see missing_scopes). permission_denied: the current workspace role does not allow the action. oauth_consent_required: an OAuth token whose person has not yet chosen the workspace and the permissions (see consent_url). mfa_required: a portal session that must still verify or set up MFA (see mfa_reason). workspace_suspended: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. |
application/problem+json |
404 |
not_found: no component with this id in the caller's workspace. |
application/problem+json |
405 |
method_not_allowed: the path exists, but not for this method; Allow lists the methods it answers. |
application/problem+json |
429 |
rate_limited: the limit of the route class (rate_limit.limit_class: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait Retry-After seconds. rate_limiter_unavailable (503) is answered for heavy routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). |
application/problem+json |
500 |
internal_error (nothing about the failure; quote request_id) or configuration_error. |
application/problem+json |
503 |
database_unavailable: the API could not reach its database (timeout, dropped connection). Wait Retry-After seconds and send the same request again: repeating is safe with the same Idempotency-Key; without it a POST may already have been applied. |
application/problem+json |
curl "https://api.taggor.dev/v1/components/cmp_0123456789abcdefghjkmnpqrs/errors/summary" \ -H "Authorization: Bearer $TAGGOR_API_KEY"const response = await fetch("https://api.taggor.dev/v1/components/cmp_0123456789abcdefghjkmnpqrs/errors/summary", { headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },});if (!response.ok) throw new Error(await response.text());const result: unknown = await response.json();console.log(result);{ "component_id": "cmp_0123456789abcdefghjkmnpqrs", "start_at": "2026-11-10T12:00:00.000Z", "end_at": "2026-11-11T12:00:00.000Z", "environment": "production", "computed_at": "2026-11-11T12:00:00.000Z", "trust": "forgeable", "available": true, "truncated": false, "versions": [ { "version_id": "ver_0123456789abcdefghjkmnpqrs", "semver": "1.1.0", "mounts": 200, "errors": 7, "error_rate": 0.035, "forgeable": true } ]}