/v1/metrics/* endpoints return the aggregates behind a sales dashboard. Every number is computed the same way the Cockpit computes it, so a figure from the API and the same figure on screen will agree.
Start with GET /v1/metrics/summary — one request covering meetings booked, sit rate, dial activity, pipeline created, deals won and lost, and new leads.
Sit rate
Sit rate is the share of held meetings someone actually turned up to:
Check
undispositioned before you trust sitRate. A rate of 0.5 off two marked meetings out of fifty held is not a sit rate — it’s a sample of two.
Rates are
null, never 0, when the denominator is empty. A window with no marked meetings returns sitRate: null, so you can tell “no data” from “nobody showed up”.What counts as a booked meeting
Meetings reach Leadey from three places, and the same meeting often arrives from more than one:- A Calendly booking
- A meeting booked in Leadey, through the scheduler on a lead
- An event on a rep’s connected Google or Outlook calendar
leadId.
Because a meeting’s identity spans sources, its id is a composite source:id — for example leadey:sm_123. Use that whole string with GET /v1/meetings/{key}.
Timezones
Any metric bucketed by day needs to know which day you mean. There’s no workspace-wide timezone, so pass one:timezone takes an IANA name and defaults to UTC. It matters more than it looks: a 9pm meeting in London falls on the next UTC day, so a daily report built without it will file some meetings against the wrong date. Every response echoes the timezone it used in window.timezone.
Money and currencies
Values are decimal strings, not numbers:Grouping
groupBy splits the totals into buckets while keeping the overall figures:
Each bucket carries the same fields as
totals, plus the key it’s grouped on. Resolve a rep key with GET /v1/users.
Windows
All metrics endpoints takefrom and to as ISO 8601 timestamps. Omit them and you get the last 30 days. A window longer than 62 days is clamped — pull long ranges as consecutive requests rather than one large one.