---
title: "Google Lsa Leads"
method: GET
path: "/admin/lsa/leads"
tags: ["admin", "lsa-admin"]
---

# Google Lsa Leads

`GET /admin/lsa/leads`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/lsa/leads`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Fetch an org's LSA leads straight from Google over the last ``lookback_days`` and, when
``reconcile`` is set (default), diff them against ``leads.lead`` by external id.

The read that separates "Google delivered no leads" from "we dropped leads Google
delivered": each account reports ``google_count`` vs ``missing_from_db_count`` (the dropped
set), and ``db_window_count`` for the reverse case (Google dry now, we ingested earlier).
Authenticates via the account's MCC manager credential where one is mapped, so it reads
even when the org's own Google Ads credential is dead. Read-only; one Google Ads op per
account. Pass ``reconcile=false`` for the raw Google fetch with no DB comparison.

## Query parameters

- `organization_id` string, required
- `lookback_days` integer
- `google_customer_id` string, nullable
- `reconcile` boolean

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Response `200`

Successful Response

- GoogleLsaLeadsProbe: Ground-truth read of an org's LSA leads straight from Google, to tell "Google had no leads" apart from "we dropped leads Google delivered".
  - `organization_id` string, required
  - `since` string, date-time, required: Lower bound (UTC) on lead received_at that was queried.
  - `lookback_days` integer, required
  - `reconciled` boolean, required: Whether results were diffed against leads.lead. False = raw Google fetch only.
  - `accounts` GoogleLsaAccountLeadsProbe[]
    - `google_customer_id` string, required
    - `login_customer_id` string, nullable
    - `google_count` integer, required: Leads Google's API returned for the window.
    - `db_window_count` integer, nullable: Total lsa leads already in leads.lead for this account in the window. None if reconcile skipped.
    - `present_in_db_count` integer, nullable: How many of Google's returned leads are already in leads.lead. None if reconcile skipped.
    - `missing_from_db_count` integer, nullable: Google leads absent from leads.lead (the dropped set = google_count - present_in_db_count). None if skip.
    - `leads` GoogleLsaProbedLead[]
      - `google_lead_id` string, required: Google's LSA lead id; matches leads.lead.external_id.
      - `google_customer_id` string, nullable
      - `lead_type` string, nullable: "MESSAGE" or "PHONE_CALL".
      - `lead_status` string, nullable
      - `credit_state` string, nullable
      - `customer_name` string, required
      - `phone_number` string, nullable
      - `message_text` string, nullable
      - `received_at` string, date-time, required
      - `in_db` boolean, nullable: When reconciled: is this Google lead present in leads.lead (by external_id)? None if reconcile skipped.

## Other responses

- `422`: Validation Error

---

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