Revinho Developer API Reference
Query the same evidence-led business intelligence shown in Revinho through a small read-only REST API or a hosted MCP server. One workspace token gives trusted server-side access to six report resources and a bounded investigation workflow.
https://www.revinho.com/api/v1Machine-readable contract
OpenAPI 3.1 specification
Import the public Revinho OpenAPI document into an agent, API client, code generator, or validation tool. It describes every REST report, bearer authentication, parameters, responses, and structured error schema.
Getting started
Make your first request
Create a workspace token in Revinho, store it once, then request the overview report.
- 1
Create an API token
Open Setup your agent in the Revinho app navigation. Tokens begin with
rv_live_and are shown only once. - 2
Set the bearer header
Store the token as
REVINHO_TOKENin a secret manager or private environment file. - 3
Call a report
Use the workspace slug from the app URL. The reporting range defaults to 30 days.
curl --request GET \
--url "https://www.revinho.com/api/v1/workspaces/acme/overview?range=30d" \
--header "Authorization: Bearer $REVINHO_TOKEN"Authentication
Bearer token
REST and MCP use the same workspace-scoped token. Include it in every request from a trusted runtime.
Bearer rv_live_your_private_tokenTreat tokens like passwords. Never place one in a URL, browser client, prompt, screenshot, repository, shared terminal, or application log.
REST API
Report endpoints
All resources use the same workspace-scoped endpoint shape. Successful requests return JSON with Cache-Control: private, no-store.
/workspaces/{workspaceSlug}/{resource}workspaceSlugpath · requiredThe workspace slug from the app URL. It must match the token's workspace.
resourcepath · requiredOne of the six report names below.
/workspaces/{workspaceSlug}/overviewBusiness overview
Headline metrics, previous-period comparisons, trends, acquisition context, and the top deterministic insights.
Query parameters
rangestringoptional7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.
comparestringoptionalprevious_period, previous_year, none, or an earlier equal-length custom interval.
filtersstringoptionalURL-encoded reporting-filter JSON. Inspect filterApplicability in the response.
funnelstringoptionalA funnel ID returned by the API, such as preset:purchase or custom:<id>.
Resource data
Commonly used fields returned inside data:
currencyreadymissingperiodmetricsinsightstrendacquisitionfunnellastUpdatedAt/workspaces/{workspaceSlug}/growthAcquisition performance
Channels, sources, campaigns, organic search demand, page acquisition, and daily traffic trends.
Query parameters
rangestringoptional7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.
comparestringoptionalprevious_period, previous_year, none, or an earlier equal-length custom interval.
filtersstringoptionalURL-encoded reporting-filter JSON. Inspect filterApplicability in the response.
Resource data
Commonly used fields returned inside data:
rangetotalschannelssourcescampaignscountriesorganicQueriespagestrendsourceTrendlatestRun/workspaces/{workspaceSlug}/funnelsSaved GA4 journeys
Available funnel definitions and step-by-step performance for the selected GA4 journey.
Query parameters
rangestringoptional7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.
funnelstringoptionalA funnel ID returned by the API, such as preset:purchase or custom:<id>.
Resource data
Commonly used fields returned inside data:
propertyperiodfunnelsselectedFunnelreporterror/workspaces/{workspaceSlug}/pagesPage intelligence
Page traffic, key events, conversion, Search Console demand, classifications, and source freshness.
Query parameters
rangestringoptional7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.
comparestringoptionalprevious_period, previous_year, none, or an earlier equal-length custom interval.
filtersstringoptionalURL-encoded reporting-filter JSON. Inspect filterApplicability in the response.
Resource data
Commonly used fields returned inside data:
workspacegasearchConsolerangepageslatestSearchDatefilterOptionsfilterApplicability/workspaces/{workspaceSlug}/revenueStripe revenue
Stripe-sourced revenue, refunds, MRR, subscriptions, customers, plans, countries, and currency conversion metadata.
Query parameters
rangestringoptional7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.
comparestringoptionalprevious_period, previous_year, none, or an earlier equal-length custom interval.
filtersstringoptionalURL-encoded reporting-filter JSON. Inspect filterApplicability in the response.
Resource data
Commonly used fields returned inside data:
rangetotalsmrractiveSubscriptionstrendrevenueStreamsplanscountriescustomerMixconversionnativeTotalslatestRun/workspaces/{workspaceSlug}/opportunitiesRanked opportunities
Up to 30 active deterministic insights with score, severity, evidence, attribution quality, and reporting period.
Query parameters
This endpoint has no query parameters.
Resource data
Commonly used fields returned inside data:
periodinsightshasSearchConsoleModel Context Protocol
Investigation-ready MCP server
Connect an MCP-compatible agent to https://www.revinho.com/api/mcp. The client manages initialization, sessions, and JSON-RPC transport. During initialization, Revinho advertises guidance for choosing the smallest useful set of reports and preserving evidence boundaries.
{
"mcpServers": {
"revinho": {
"type": "streamable-http",
"url": "https://www.revinho.com/api/mcp",
"headers": {
"Authorization": "Bearer rv_live_REPLACE_WITH_YOUR_TOKEN"
}
}
}
}get_overviewrange, compare, filters, funnelBusiness overviewget_growthrange, compare, filtersAcquisition performanceget_funnelsrange, funnelSaved GA4 journeysget_pagesrange, compare, filtersPage intelligenceget_revenuerange, compare, filtersStripe revenueget_opportunities—Ranked opportunitiesClients that expose MCP prompts can invoke investigate_business with a required question plus optional range and comparison. It guides the agent through a bounded investigation, including evidence checks, stopping conditions, and the final answer contract.
Every tool declares read-only, non-destructive, idempotent, and closed-world annotations. Results are returned against an explicit output schema as both structured content and a JSON text content block.
Reference
Reporting ranges
Preset windows use measured days. Custom REST intervals use inclusive UTC calendar dates.
7dLast 7 days30dLast 30 days · default90dLast 90 daysmtdMonth to date?range=custom:2026-07-01:2026-07-31?range=custom:2026-08-22:2026-08-23&compare=custom:2026-08-15:2026-08-16- An absent or invalid range falls back to
30d. - Opportunities use their deterministic evaluation period and ignore
range. - Comparison defaults to
previous_period. Useprevious_year,none, or an earlier equal-length custom interval when needed. - REST and MCP both support presets and custom ranges.
Reference
Reporting filters
Pass filter groups as URL-encoded JSON. Every group must match; clauses within a group use its and or or operator.
{
"groups": [
{
"operator": "and",
"clauses": [
{ "dimension": "channel", "values": ["Organic Search"] },
{ "dimension": "country", "values": ["PT", "GB"] }
]
}
]
}page/pricinglandingPage/guides/saas-metricschannelOrganic Searchsourcegooglemediumorganiccampaignspring_launchcountryPTdevicedesktopcurrencyEURFILTERS='{"groups":[{"operator":"and","clauses":[{"dimension":"channel","values":["Organic Search"]}]}]}'
curl --get \
--header "Authorization: Bearer $REVINHO_TOKEN" \
--data-urlencode "range=30d" \
--data-urlencode "filters=$FILTERS" \
"https://www.revinho.com/api/v1/workspaces/acme/growth"Source support varies by dimension. Read filterApplicability before describing a result as filtered. Stripe totals in a filtered overview remain unfiltered associated context.
Reference
Rate limits
Each workspace token can make 30 authenticated requests per 60-second window. REST and MCP consume the same allowance, so switching protocols does not create a second quota.
RateLimit-LimitMaximum requests available in the current window.
RateLimit-RemainingRequests remaining before the token is limited.
RateLimit-ResetSeconds until the current window resets.
RateLimit-PolicyThe applied limit and window, returned as 30;w=60.
Retry-AfterSeconds to wait. Returned only with a 429 response.
Every authenticated HTTP request counts, including requests that return validation or not-found errors. Cache responses when appropriate and use bounded backoff after a 429 response.
Reference
Response envelope
Every report uses a common envelope around its resource-specific data.
{
"workspace": "acme",
"resource": "overview",
"range": "30d",
"generatedAt": "2026-08-07T10:42:18.000Z",
"data": {
"currency": "EUR",
"ready": true,
"period": {
"startDate": "2026-07-08T00:00:00.000Z",
"endDate": "2026-08-06T00:00:00.000Z"
},
"metrics": { "...": "resource-specific fields" },
"insights": [],
"filterApplicability": {
"googleAnalytics": "unfiltered",
"stripe": "unfiltered"
}
},
"filters": { "groups": [] },
"annotations": [],
"annotationBoundary": "Annotations provide context, not causal evidence."
}workspaceRequested workspace slug.
resourceReport resource that produced the response.
rangeSelected range; omitted for opportunities.
comparisonSelected comparison; omitted for opportunities and funnels.
generatedAtResponse generation time, not provider freshness.
dataResource-specific report. May be null or partial when a provider is unavailable.
filtersParsed filter model applied to the request.
annotationsUser-provided workspace events inside the report period.
annotationBoundaryReminder that annotations provide context, not causal evidence.
Dates are ISO 8601 strings. Integers too large for safe JSON numbers, including financial bigint values, are serialized as strings. Sensitive credential fields are removed.
Reference
Errors
REST errors use a stable code, human-readable message, and actionable resolution hint.
{
"error": {
"code": "unauthorized",
"message": "A valid Revinho bearer token is required.",
"resolution": "Create an active workspace token in Setup your agent, then send it as Authorization: Bearer <token>."
}
}400invalid_filtersValidate and URL-encode the filter JSON.401unauthorizedSend a valid active token in the bearer header.404not_foundCheck the resource and workspace slug.405method_not_allowedUse GET for read-only workspace reports.429rate_limitedWait for Retry-After seconds before sending another request.500server_errorRetry later with bounded backoff.MCP authentication failures use JSON-RPC error code -32001 with HTTP status 401. MCP rate-limit failures use -32029 with HTTP status 429. Provider-level issues can appear inside a successful report as an error field, null report, or missing flag.
Interpretation
Data contracts
Preserve these boundaries when an application or agent explains a Revinho response.
Stripe is revenue truth
Do not substitute GA4 revenue or an acquisition estimate for Stripe-sourced financial facts.
Money uses minor units
Read the currency and field definition before formatting an integer as a decimal amount.
Attribution stays labeled
Keep verified, modeled, and associated provenance attached to revenue relationships.
Association is not causation
Use coincided with, associated with, or during the same period unless evidence is deterministic.
Freshness is explicit
Use provider sync fields—not generatedAt—to describe how current the underlying data is.
Null is not zero
A null metric or comparison can mean unavailable evidence. Do not silently coerce it.
Security
Use the narrowest connection
Tokens are read-only, workspace-scoped, stored as cryptographic hashes, and revocable in Revinho.
- Create a separate named token for each agent, server, or environment.
- Keep tokens in a secret manager or private environment variable.
- Call Revinho from a trusted server or agent runtime, never public browser code.
- Revoke access when a machine, teammate, or integration no longer needs it.