Count leads and value by pipeline stage
Returns one row per pipeline stage, in board order (open stages, then won, then lost), with how many leads it holds and their total value. It takes the same filters as the lead list and counts only leads the key's person may see; status defaults to all here, so the won and lost rows count closed leads. Leads in a currency other than the workspace's are counted in other_currency_leads, not in value_minor. Answers 403 desk.sales_off while Sales is switched off.
Requires: desk.read scope, Converse or Contacts licence, Pro plan.
Authorization
bearerAuth A SautiDesk API key. An owner or admin makes it under Settings in SautiDesk for a named person and picks the scopes. The key is shown once. Send it as Authorization: Bearer <key>. It acts as that person and as nobody else.
In: header
Query Parameters
Only leads at this stage: its id (a UUID).
Only leads in this queue: its id (a UUID).
Only leads carrying this tag: its id (a UUID).
Only leads from this source: its id (a UUID).
Only this contact's leads: their id (a UUID). With status=open and limit=1 it returns the contact's open lead.
all (default here), open, won, lost or closed (won or lost).
Only leads at this temperature: hot, warm or cold.
mine (leads the key's person owns), unassigned (in a queue with no owner), queue (one queue: pass queue too) or all (default, every lead the person may see).
overdue (the next follow-up is past due), today (it is due before the end of today on the workspace's clock) or none (open leads with no follow-up booked).
Has no effect here: the rows always come in board order.
Only leads owned by this person: their id (a UUID), me for the key's own person, or none for unowned leads.
Response
OK
Example
{ "data": [ { "stage_id": "bfed4519-9865-4baf-930a-0ac87c16a093", "name": "Amina Wanjiru", "kind": "billing", "position": 1, "leads": 1, "value_minor": 1, "currency": "KES", "other_currency_leads": 1 } ]}datarequiredobject[]stage_idrequiredstring (uuid)namerequiredstringA name for it.kindrequiredstringWhat kind it is.positionrequiredintegerWhere it sits in the list, starting at 0.leadsrequiredintegervalue_minorrequiredintegercurrencyrequiredstringThe currency code of the money in this report, for example KES. Write money figures with it. Left out when the report has no money.other_currency_leadsrequiredintegercurl -X GET "https://api.sautidesk.com/v1/desk/leads/summary"