Reports
Read the agency's reports through the Fondaro API and MCP: list the metrics, then read any one as a table, as figures or as a list of changes.
Reports are the numbers behind the Reports screen, and lists of what changed on your leads and deals. Two routes read them: one lists the metrics, one reads a metric as a table. Both need the crm:read scope, and no role. The same two reads are the list_report_metrics and run_report_metric tools on Fondaro MCP.
A metric you can read tomorrow appears in the list without a change to how you call: you list the metrics and run an id.
Who sees which numbers
A key acts as the person it belongs to, with their role as it is now.
- A member's key reads the numbers of the leads and deals assigned to them. Sending
peopleis refused with403, and so is an admin-only metric (team, commission, ads and social numbers). - An admin's key reads the whole agency, unassigned leads included. Send
people(comma-separated team member ids) to read only those people.
A metric about the agency itself, such as ads or social, takes no people: asking for one is a 400.
List the metrics
GET /v1/reports/metrics
| Parameter | Type | Required | Description |
|---|---|---|---|
category | Query, string | No | Only one category: leads, deals, tasks, calls, emails, team, ads or social |
kind is numbers (figures by period, category or person) or changes (one row per change). groupBy and filters are what the metric takes, and takesPeople is false for the agency's own numbers. A filter's kind says what it takes: tag and enum a list of values, id one record's id and boolean true. A member's list leaves out the admin-only metrics.
Read a metric
GET /v1/reports/metrics/{metricId}
| Parameter | Type | Required | Description |
|---|---|---|---|
metricId | Path, string | Yes | An id from the list. It contains a dot, as in leads.by_source |
timeframe | Query, string | No | last_7d, last_30d (the default), last_90d, this_month, last_month, this_quarter, last_quarter, ytd or custom |
from, to | Query, date | With custom | The first and the last day, YYYY-MM-DD. from and to alone mean custom |
bucket | Query, string | No | The period of a row in a series: day, week (the default), month or quarter |
groupBy | Query, string | No | One of the metric's groupBy ids |
filters | Query, JSON | No | The metric's filters as a JSON object of filter id to value: {"source":["idealista"]} |
people | Query, string | No | Admins only: team member ids, comma-separated |
limit | Query, integer | No | A list of changes only: rows a page. 100 by default, 500 at most |
cursor | Query, string | No | A list of changes only: nextCursor from the page before |
A window is at most 731 days, and at most 366 with bucket=day.
The table
Every metric answers the same table:
fromis included andtois not.peopleisagency, or the member ids the numbers are for.columnssays what each key in a row is.typeisstring,number,date,datetime,money,percent,id,people(a list of{ id, name }) ortags(a list of{ id, name }).- A numbers metric is one row per period (a series over time), per category, or per person (a leaderboard), or one row for a single number.
valueis the headline figure, withpreviousandchangePctwhen the metric sets it against the window before. A numbers table is not paged:hasMoreisfalse. - A changes metric is one row per change, newest first, paged with
limitandcursor.
A list of changes
leads.tag_changes lists every time a lead's tags changed: what was added, what was taken off, the tags before and after, who changed them and where. Tag names are as they were at the time.
Tag changes are recorded from the day this list was switched on. Changes before that day were not recorded, so a window that starts earlier has nothing from before it.
Send nextCursor back as cursor, with the same other parameters, for the next page. A change that no person made, such as an import, has the place it came from in source.
Filters narrow a list: filters={"leadId":"1042"} reads one lead's changes, and filters={"tag":["8a4e6d21-c3b9-4f70-a512-7e9d0c1b3a64"]} the changes that added or took off that tag.
Metrics
The ids you can run. The list route is the source of truth for your key: a member's list leaves out the admin-only ones, and a metric appears there once it can be read.
| Category | Metric ids |
|---|---|
| Leads | leads.created_over_time, leads.by_status, leads.by_source, leads.by_language, leads.by_country, leads.qualification_rate, leads.status_funnel, leads.avg_time_in_status, leads.purchased_revenue, leads.by_tag, leads.time_to_first_answer |
| Deals | deals.created_over_time, deals.pipeline_by_stage, deals.pipeline_value_by_stage, deals.win_rate, deals.won_lost_over_time, deals.revenue_won_over_time, deals.avg_deal_size, deals.avg_time_to_close, deals.lost_reasons, deals.avg_time_in_stage, deals.stalled, deals.commission_won_over_time, deals.commission_breakdown, deals.commission_by_agent and deals.commission_due_by_agent (admin only) |
| Tasks | tasks.completed_over_time, tasks.completion_rate, tasks.overdue, tasks.status_split |
| Calls | calls.over_time, calls.by_outcome, calls.answer_rate, calls.avg_duration, calls.cost_over_time, calls.sentiment, calls.top_objections |
| Emails and messages | emails.sent_over_time, emails.by_status, messages.by_channel |
| Team | team.leaderboard, team.activity_by_assignee, team.time_to_first_answer (all admin only) |
| Ads | ads.lead_outcomes, ads.spend_over_time, ads.spend, ads.leads, ads.cost_per_lead (all admin only) |
| Social | social.reach, social.engagement, social.followers (all admin only) |
| Lists of changes | leads.status_changes, deals.stage_changes, leads.assignment_changes, leads.tag_changes |
Errors
Errors have the standard /v1 envelope. The message says what is possible.
| Status | When |
|---|---|
400 | An unknown metric, a groupBy or a filter the metric does not take, people on an agency metric, a custom window without from and to, or a window past the limits |
401 | No valid API key |
403 | The key lacks crm:read, a member sent people, or a member asked for an admin-only metric |
500 | The metric could not be read on our side. Try again in a minute |