---
title: "Lead to eight sessions by lead month, from the current practice packet"
method: GET
path: "/companies/{companyId}/metrics/practice/lead-funnel"
tags: ["Overview"]
---

# Lead to eight sessions by lead month, from the current practice packet

`GET /companies/{companyId}/metrics/practice/lead-funnel`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/metrics/practice/lead-funnel`
- Auth: HTTP bearer

#4964 (Augusto's decisions, #4964 c7008793366; Lead's option A, bounded): read-only, from the current approved practice packet's `leadFunnel` aggregate. One cohort per month the leads coverage touches, oldest first. A month the packet holds no cohort for (a partly covered edge month) is `covered: false` with every figure null, never zero; a covered month with no leads reads 0. In a covered month, `notCovered` names the counts its export doesn't carry (`firstBooked`, `transferredIn`, `broughtClients`, `sessions.consults`, `sessions.booked`), null in the practice and therapist rows, never 0 (median-ops #599); `notCovered` is null in a month not covered. `therapists` lists only the clinicians with a credited lead or brought client, with the roster's key and label in roster order; an absent clinician is 0. `milestone.status`: `too_recent` when no window has ended yet, `partial` when some have, `observed` when all have, `none` without a first completed session. Without a packet or aggregate: `unavailable` with `no_packet` or `no_lead_funnel`. Human sessions only (API keys 403). 404 unless `practice_metrics` is in the company's `additionalMetrics` list.

## Path parameters

- `companyId` string, uuid, required

## Response `200`

The lead-to-eight-sessions cohorts, or why they are unavailable

- PracticeLeadFunnelResponse
  - `success` true, required
  - `data` object, required
    - `status` 'ok' | 'unavailable', required
    - `reason` 'no_packet' | 'no_lead_funnel' | 'null', nullable, required
    - `definitions` object, required
      - `milestoneSessions` integer, required
      - `milestoneWindowDays` integer, required
      - `leadDedupeDays` integer, required
    - `cutoff` string, date, nullable, required
    - `coverage` object, required
      - `leadsFrom` string, date, nullable, required
      - `leadsThrough` string, date, nullable, required
      - `sessionsFrom` string, date, nullable, required
      - `sessionsThrough` string, date, nullable, required
    - `source` object, nullable, required
      - `packetId` string, required
      - `approvedAt` string, date-time, required
    - `cohorts` object[], required
      - `month` string, required
      - `covered` boolean, required
      - `notCovered` string[], nullable, required
      - `practice` LeadFunnelStage, nullable, required: #4964: one cohort's leads through each stage. Credit: the clinician of the first completed and paid session, else of the first booked one. reachedEight counts eligible leads only (their 180-day window ended by the cutoff); milestonePending counts windows still open.
        - `leads` integer, required
        - `firstBooked` integer, nullable, required: Null when the export doesn't carry bookings (not covered, never 0).
        - `firstCompletedPaid` integer, required
        - `transferredIn` integer, nullable, required: Null when the export doesn't carry first bookings, so a move can't be told (not covered, never 0).
        - `reachedEight` integer, required
        - `milestoneEligible` integer, required
        - `milestonePending` integer, required
      - `unassignedLeads` integer, nullable, required
      - `broughtClients` integer, nullable, required
      - `sessions` LeadFunnelSessionCounts, nullable, required: #4964: the cohort's sessions, each counted once however many payments or processors it has. booked: non-consult sessions not attended (upcoming, no-show or cancelled).
        - `consults` integer, nullable, required: Null when the export doesn't carry consults (not covered, never 0).
        - `booked` integer, nullable, required: Null when the export doesn't carry unattended bookings (not covered, never 0).
        - `attendedUnpaid` integer, required
        - `attendedPaid` integer, required
      - `milestone` object, nullable, required
        - `eligible` integer, required
        - `reached` integer, required
        - `pending` integer, required
        - `status` 'observed' | 'partial' | 'too_recent' | 'none', required
      - `therapists` intersection[], required
        - intersection
          - [`LeadFunnelStage`](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b/schema?at=%2Fcomponents%2Fschemas%2FLeadFunnelStage)
          - object
            - `key` string, required
            - `label` string, required
            - `broughtClients` integer, nullable, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: practice_metrics is not in this company's additionalMetrics list

## Changes

- **2026-11-19** `96dc1148df17`: 2 breaking, 1 warning
  - the response property `data/cohorts/items/practice/oneOf[#/components/schemas/LeadFunnelStage]/transferredIn` became nullable for the status `200`
  - the response property `data/cohorts/items/therapists/items/allOf[#/components/schemas/LeadFunnelStage]/transferredIn` became nullable for the status `200`
  - added the new `transferredIn` enum value to the `data/cohorts/items/notCovered/items/` response property for the response status `200`
- **2026-11-19** `4221d727b94f`: 5 breaking, 1 info
  - the response property `data/cohorts/items/practice/oneOf[#/components/schemas/LeadFunnelStage]/firstBooked` became nullable for the status `200`
  - the response property `data/cohorts/items/sessions/oneOf[#/components/schemas/LeadFunnelSessionCounts]/booked` became nullable for the status `200`
  - the response property `data/cohorts/items/sessions/oneOf[#/components/schemas/LeadFunnelSessionCounts]/consults` became nullable for the status `200`
  - the response property `data/cohorts/items/therapists/items/allOf[#/components/schemas/LeadFunnelStage]/firstBooked` became nullable for the status `200`
  - …2 more
- **2026-11-19** `7c5ea8542f44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/companies/:companyId/metrics/practice/lead-funnel/get.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
