Revinho developer platform

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.

JSON responses Bearer authentication No write methods
Base URLhttps://www.revinho.com/api/v1

Machine-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. 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. 2

    Set the bearer header

    Store the token as REVINHO_TOKEN in a secret manager or private environment file.

  3. 3

    Call a report

    Use the workspace slug from the app URL. The reporting range defaults to 30 days.

Request
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.

AuthorizationBearer rv_live_your_private_token

Treat 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.

GET/workspaces/{workspaceSlug}/{resource}
workspaceSlugpath · required

The workspace slug from the app URL. It must match the token's workspace.

resourcepath · required

One of the six report names below.

GET/workspaces/{workspaceSlug}/overview
read only

Business overview

Headline metrics, previous-period comparisons, trends, acquisition context, and the top deterministic insights.

Query parameters

rangestringoptional

7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.

comparestringoptional

previous_period, previous_year, none, or an earlier equal-length custom interval.

filtersstringoptional

URL-encoded reporting-filter JSON. Inspect filterApplicability in the response.

funnelstringoptional

A funnel ID returned by the API, such as preset:purchase or custom:<id>.

Resource data

Commonly used fields returned inside data:

currencyreadymissingperiodmetricsinsightstrendacquisitionfunnellastUpdatedAt
GET/workspaces/{workspaceSlug}/growth
read only

Acquisition performance

Channels, sources, campaigns, organic search demand, page acquisition, and daily traffic trends.

Query parameters

rangestringoptional

7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.

comparestringoptional

previous_period, previous_year, none, or an earlier equal-length custom interval.

filtersstringoptional

URL-encoded reporting-filter JSON. Inspect filterApplicability in the response.

Resource data

Commonly used fields returned inside data:

rangetotalschannelssourcescampaignscountriesorganicQueriespagestrendsourceTrendlatestRun
GET/workspaces/{workspaceSlug}/funnels
read only

Saved GA4 journeys

Available funnel definitions and step-by-step performance for the selected GA4 journey.

Query parameters

rangestringoptional

7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.

funnelstringoptional

A funnel ID returned by the API, such as preset:purchase or custom:<id>.

Resource data

Commonly used fields returned inside data:

propertyperiodfunnelsselectedFunnelreporterror
GET/workspaces/{workspaceSlug}/pages
read only

Page intelligence

Page traffic, key events, conversion, Search Console demand, classifications, and source freshness.

Query parameters

rangestringoptional

7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.

comparestringoptional

previous_period, previous_year, none, or an earlier equal-length custom interval.

filtersstringoptional

URL-encoded reporting-filter JSON. Inspect filterApplicability in the response.

Resource data

Commonly used fields returned inside data:

workspacegasearchConsolerangepageslatestSearchDatefilterOptionsfilterApplicability
GET/workspaces/{workspaceSlug}/revenue
read only

Stripe revenue

Stripe-sourced revenue, refunds, MRR, subscriptions, customers, plans, countries, and currency conversion metadata.

Query parameters

rangestringoptional

7d, 30d, 90d, mtd, or a custom UTC interval. Defaults to 30d.

comparestringoptional

previous_period, previous_year, none, or an earlier equal-length custom interval.

filtersstringoptional

URL-encoded reporting-filter JSON. Inspect filterApplicability in the response.

Resource data

Commonly used fields returned inside data:

rangetotalsmrractiveSubscriptionstrendrevenueStreamsplanscountriescustomerMixconversionnativeTotalslatestRun
GET/workspaces/{workspaceSlug}/opportunities
read only

Ranked 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:

periodinsightshasSearchConsole

Model 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.

Generic MCP configuration
{
  "mcpServers": {
    "revinho": {
      "type": "streamable-http",
      "url": "https://www.revinho.com/api/mcp",
      "headers": {
        "Authorization": "Bearer rv_live_REPLACE_WITH_YOUR_TOKEN"
      }
    }
  }
}
ToolOptional inputReturns
get_overviewrange, compare, filters, funnelBusiness overview
get_growthrange, compare, filtersAcquisition performance
get_funnelsrange, funnelSaved GA4 journeys
get_pagesrange, compare, filtersPage intelligence
get_revenuerange, compare, filtersStripe revenue
get_opportunitiesRanked opportunities

Clients 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 days
30dLast 30 days · default
90dLast 90 days
mtdMonth to date
Custom range?range=custom:2026-07-01:2026-07-31
Custom comparison?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. Use previous_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.

Filter object
{
  "groups": [
    {
      "operator": "and",
      "clauses": [
        { "dimension": "channel", "values": ["Organic Search"] },
        { "dimension": "country", "values": ["PT", "GB"] }
      ]
    }
  ]
}
page/pricing
landingPage/guides/saas-metrics
channelOrganic Search
sourcegoogle
mediumorganic
campaignspring_launch
countryPT
devicedesktop
currencyEUR
URL-encoded request
FILTERS='{"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"
4 groups max8 clauses per group20 values per clause8,000 serialized characters

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.

30 requests60 second window1 shared token quota
RateLimit-Limit

Maximum requests available in the current window.

RateLimit-Remaining

Requests remaining before the token is limited.

RateLimit-Reset

Seconds until the current window resets.

RateLimit-Policy

The applied limit and window, returned as 30;w=60.

Retry-After

Seconds 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.

200 OK
{
  "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."
}
workspace

Requested workspace slug.

resource

Report resource that produced the response.

range

Selected range; omitted for opportunities.

comparison

Selected comparison; omitted for opportunities and funnels.

generatedAt

Response generation time, not provider freshness.

data

Resource-specific report. May be null or partial when a provider is unavailable.

filters

Parsed filter model applied to the request.

annotations

User-provided workspace events inside the report period.

annotationBoundary

Reminder 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.

401 Unauthorized
{
  "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>."
  }
}
StatusCodeAction
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.

01

Stripe is revenue truth

Do not substitute GA4 revenue or an acquisition estimate for Stripe-sourced financial facts.

02

Money uses minor units

Read the currency and field definition before formatting an integer as a decimal amount.

03

Attribution stays labeled

Keep verified, modeled, and associated provenance attached to revenue relationships.

04

Association is not causation

Use coincided with, associated with, or during the same period unless evidence is deterministic.

05

Freshness is explicit

Use provider sync fields—not generatedAt—to describe how current the underlying data is.

06

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.
Ready to connect?

Create a read-only workspace token.

Open Revinho