Read dashboard analytics and revenue
Use the V2 reporting API to reproduce LeadTruffle's Home, Revenue, Website and Google Local Services reports in your own dashboard or reporting tool.
Choose a report
Endpoint after /api/v2/pub |
Report | Required permission |
|---|---|---|
/analytics/overview |
New contacts, inquiries, bookings made, attention count, inquiry trends and categories | analytics:read |
/analytics/revenue |
Spend, won and pipeline value, outcomes, costs per contact/win, ROAS, source rows, trends and comparison | revenue:read |
/analytics/website |
Sessions, page views, inquiries, trends and inquiry sources | analytics:read |
/analytics/google-lsa |
Saved Google LSA lead counts, spend, credits, feedback, impressions, visibility and account breakdowns | analytics:read |
Restricted API keys must grant the permission listed above. Existing unrestricted keys retain access. Select the reporting permissions you need from Settings → API Keys. Individual scopes grant only the corresponding Inbox and reporting endpoints; other public endpoints require an unrestricted key (ALL_SCOPES, or legacy null scopes). A key containing only reporting permissions cannot use general API reads or writes. Reporting requires an active company, key, and subscription or trial.
Select dates
curl 'https://pub-api.leadtruffle.com/api/v2/pub/analytics/revenue?startDate=2026-09-01&endDate=2026-09-30&includePreviousPeriod=true' \
-H 'X-API-Key: YOUR_API_KEY'
Choose a preset such as LAST_30_DAYS, or supply both startDate and endDate. Do not supply a preset with explicit dates. The default is the last 30 days. Dates are inclusive calendar dates in your company's timezone. A selected period can contain up to 90 days; the optional comparison covers the equally long period immediately before it. The response includes exact UTC boundaries.
Revenue returns totals, source rows and charts together. Its optional sourceKey filters the entire report; take that key from returned source rows. Home inquiry categories and Revenue acquisition sources have different meanings and should not be joined by display label.
Website's qualificationStatus filters inquiry counts and sources. Sessions and page views still include all website traffic. Google LSA can filter by an enabled advertiserAccountId or a leadType; spend and its charged-lead denominator retain the dashboard's account-period basis even when lead-type counts are filtered.
Unknown query parameters, repeated parameters, invalid boolean strings and conflicting date selections return 400. There is no force-refresh or cache-bypass parameter.
Polling and rate limits
Every report is cached for five minutes, including historical reports. Polling once every five minutes is usually sufficient. Equivalent queries share a company's cached report across its API keys.
The existing 600 requests per 10 minutes per company allowance is unchanged. Reporting shares that allowance with general public API requests; multiple keys do not create additional allowances. Every request counts, including a cache hit. A 429 includes Retry-After in seconds. A temporary 503 means you should retry later.
freshness.generatedAt is when a report was calculated, and freshness.expiresAt is the end of its five-minute cache period. Those timestamps do not establish when an external provider last supplied data.
Revenue values and coverage
Money is a decimal string with an explicit currency. Each money summary separates actual and estimated amounts and reports coverage. Inspect those fields before using the total in another report: missing configuration or incomplete provider data is not a confirmed zero.
Won value follows your dashboard's configured revenue mode and contact cohort. It is not the amount of cash collected during the selected dates. Bookings are counted when made, exclude imported appointments and reschedules, and include bookings later cancelled.
Google reporting freshness
Google LSA reports read saved leads and spend/visibility snapshots. googleLsaSnapshots includes snapshot retrieval and lead-sync timestamps for each advertiser account, with CURRENT, OUTDATED or INCOMPLETE reporting coverage. Those states are separate from the report's five-minute cache.
A read can signal a background reporting refresh, but automatic refresh attempts are limited to once per Google account in six hours. Failures also consume that interval. Changing dates, keys or endpoints cannot force another Google fetch. Dashboard users have a separate manual refresh action with a shorter cooldown; public API callers cannot use that override. Refreshes cover a bounded rolling window; requesting older dates does not start an arbitrary provider backfill.
Complete saved totals remain readable when outdated, with their age shown. Missing days or metrics remain incomplete. Google average CPL is aggregate spend divided by charged leads, not the exact price of an individual lead. Mixed account currencies are never silently combined into one money total.
See the API reference for exact response fields and filters.