## §OIP SYSTEM ARTICLE — LEADS (23 operations)
A generated article for one OIP shelf. It lists every operation in this API/CLI/MCP/device/model/core subsystem, links each leaf article, and gives the ledger path for proof.

### Read Order
- scan operations
- open a leaf doc
- run via run_now or POST /api/dispatch
- open receipt
- repair/replay if needed

### Operations
- **LEADS_DISCOVER** — Find businesses likely to buy peptides wholesale or want white-label, by type and city. Free source (OpenStree
  when: start a new outreach batch for a place.
  args: $1 = segment (medspa | clinic | wellness | gym | supplement), $2 = city, $3 = max results (default 40).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DISCOVER&body=medspa%7CLos%20Angeles%7C40&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER
- **LEADS_ENRICH** — Visit one lead's website and pull the best contact email. Sets the lead to enriched or no_email.
  when: after discovery, to get an email to reach out to.
  args: $1 = lead id.
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_ENRICH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_ENRICH&body=12&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_ENRICH
- **LEADS_DRAFT** — Write a wholesale + white-label outreach email for one lead. Saves the draft on the lead. DOES NOT SEND.
  when: after enrich, to prepare the message for the custodian to approve.
  args: $1 = lead id, $2 = which company it comes from (default miscsubjects).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DRAFT&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DRAFT&body=12%7Cmiscsubjects&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DRAFT
- **LEADS_LIST** — List leads and a count by status (new, enriched, drafted, no_email, sent).
  when: see the outreach pipeline.
  args: $1 = status filter (optional; blank = all).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_LIST&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_LIST&body=drafted&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_LIST
- **LEADS_ENRICH_BATCH** — Enrich the next batch of un-enriched leads in one call (finds emails + context). Bounded so it never fails; ca
  when: after discovery, to fill in emails and context for many leads.
  args: $1 = how many to do this call (default 8, max 10).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_ENRICH_BATCH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_ENRICH_BATCH&body=10&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_ENRICH_BATCH
- **LEADS_RUN_CITY** — One call = discover a segment in a city, then enrich a batch. The fastest way to grow the pipeline.
  when: add a new city/segment to the pipeline.
  args: $1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = discover limit (default 40), $4 = enrich count (default 8).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_RUN_CITY&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_RUN_CITY&body=medspa%7CMiami%7C40%7C8&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_RUN_CITY
- **LEADS_DRAFT_AI** — Grok drafts one review-only outreach email grounded in OUTREACH_DOSSIER and the business site. DOES NOT SEND. 
  when: only after enrichment, MX verification, and ICP scoring.\n# ARGS: $1=lead id, $2=brand (default LeoResearch).\n# EX: [LEADS_DRAFT_AI]131|Leo
  args: $1=lead id, $2=brand (default LeoResearch).\n# EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]\n["$1","$2"]
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DRAFT_AI&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DRAFT_AI&body=131%7CLeoResearch&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DRAFT_AI
- **LEADS_SEND** — Send ONE lead's already-saved email through the owner-reviewed Marketing admin.
  when: only after the custodian reviewed the exact recipient, subject, and body in Admin → Marketing → Leads, approved that exact copy, and separately clic
  args: $1=CONFIRM, $2=lead id, $3=from local-part, $4=owner-browser exact-copy approval token.
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SEND&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SEND&body=%3CCONFIRM%3E%7C%3Carg2%3E%7C%3Carg3%3E%7C%3Carg4%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SEND
- **LEADS_SEND_BATCH** — Batch outreach sending is disabled.
  when: never; use the owner-reviewed individual send path in Admin → Marketing → Leads.
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SEND_BATCH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SEND_BATCH&body=%3Carg1%3E%7C%3Carg2%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SEND_BATCH
- **LEADS_DISCOVER_AI** — SCRAPER 2 — Grok live web search finds real businesses (with verified official websites) that OpenStreetMap do
  when: grow the pipeline in a city where LEADS_DISCOVER (OSM) returned few results, or to reach richer segments (longevity, weightloss, chiro).
  args: $1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = count (default 20, cap 30).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_AI&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DISCOVER_AI&body=longevity%7CScottsdale%7C20&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_AI
- **LEADS_FIND_SITES** — Rescue websiteless leads — one Grok live-search call finds official websites for a batch of leads that have na
  when: when leads sit in status=new with no website (OSM often lacks the website tag) — they are unreachable until this runs.
  args: $1 = batch size (default 8, cap 10).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_FIND_SITES&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_FIND_SITES&body=8&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_FIND_SITES
- **LEADS_REENRICH** — Second pass over status=no_email leads with the deep crawler (mailto links, Cloudflare-obfuscated emails, JSON
  when: rescue contactable emails from the no_email pool without any new discovery.
  args: $1 = batch size (default 6, cap 8).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_REENRICH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_REENRICH&body=6&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_REENRICH
- **LEADS_SWEEP** — Multi-city sweep — one segment across up to 3 cities (OSM discover per city) plus one enrich batch, in a singl
  when: fastest way to open several new cities at once.
  args: $1 = segment, $2 = comma-separated cities (max 3), $3 = per-city discover limit (default 40).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SWEEP&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SWEEP&body=medspa%7CPhoenix%2CScottsdale%2CHouston%7C40&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SWEEP
- **LEADS_VERIFY_MX** — Verify whether the email domain publishes MX records using DNS-over-HTTPS. Tags mx:ok or mx:none. This verifie
  when: after enrichment and before ICP scoring or drafting.\n# ARGS: $1=max leads (default 25, cap 50).\n# EX: [LEADS_VERIFY_MX]25[/LEADS_VERIFY_MX
  args: $1=max leads (default 25, cap 50).\n# EX: [LEADS_VERIFY_MX]25[/LEADS_VERIFY_MX]\n["$1"]
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_VERIFY_MX&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_VERIFY_MX&body=25&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_VERIFY_MX
- **LEADS_SCORE_AI** — AI ICP scoring — one Grok (grok-4.3) call scores a batch of enriched leads 0-100 on real wholesale/white-label
  when: after enrichment, before drafting; "score the leads", "which leads are actually worth emailing".
  args: $1 = batch size (default 8, cap 10). Call repeatedly until it returns scored:0.
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SCORE_AI&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SCORE_AI&body=8&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SCORE_AI
- **LEADS_DISCOVER_PLACES** — Discover B2B leads via Google Places API (New) — med-spas/clinics/longevity by segment + city, with website/ph
  when: "find medspas in Newport Beach", building the wholesale target list.
  args: $1=segment free text (e.g. "medical spa","longevity clinic"), $2=city, $3=limit (default 40).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_PLACES&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DISCOVER_PLACES&body=medical%20spa%7CNewport%20Beach%7C40&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_PLACES
- **LEADS_RESOLVE_SITES** — Backfill missing websites on siteless leads (NPPES rows have name + phone + address but never a website) so th
  when: after LEADS_DISCOVER_NPI, before enrichment.
  args: $1=limit (default 20, max 30). $2=segment LIKE filter, e.g. chiro (optional; blank = any segment).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_RESOLVE_SITES&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_RESOLVE_SITES&body=30%7Cchiro&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_RESOLVE_SITES
- **LEADS_FOLLOWUPS** — Generate the follow-up sequence (touch 2 new-angle + touch 3 break-up) for an already-drafted lead, on the sam
  when: after LEADS_DRAFT_AI has produced the first touch; before sending, so the whole 3-touch sequence is staged for review.
  args: $1=lead id, $2=brand (default LeoResearch).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_FOLLOWUPS&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_FOLLOWUPS&body=2633%7CLeoResearch&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_FOLLOWUPS
- **LEADS_DISCOVER_ORG** — SCRAPER 5 — organization discovery for a promo class via live web search. Finds real organizations with verifi
  when: populating a promo class with real organizations before enrichment; "find AI assurance firms".
  args: $1 = promo class key (must exist in promo_classes), $2 = free-text query, $3 = count (default 12, cap 20).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_ORG&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DISCOVER_ORG&body=ai-assurance%7CAI%20audit%20and%20assurance%20firms%7C12&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_ORG
- **LEADS_DISCOVER_NPI** — Discover leads from the NPPES NPI Registry (authoritative federal provider directory, free/no key). Real clini
  when: broad authoritative discovery of clinics/providers by taxonomy + city/state.
  args: $1=taxonomy_description, $2=city, $3=state(2-letter), $4=limit(default 200, NPPES hard cap per call), $5=skip(0-1000 - NPPES returns max 200 per call, so page a dense city with skip 200/400/600/800/1000 or it silently truncates), $6=postal_code(optional, targets one ZIP).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_NPI&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_DISCOVER_NPI&body=Chiropractor%7CLos%20Angeles%7CCA%7C200%7C400&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_NPI
- **LEADS_SHEET_SYNC** — 
  when: "put the lead segment/source breakdown on the sheet", "sync the lead sheet" (run
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_SYNC&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SHEET_SYNC&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_SYNC
- **LEADS_SHEET_ENRICHED** — 
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_ENRICHED&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SHEET_ENRICHED&body=%3Carg1%3E&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_ENRICHED
- **LEADS_SHEET_PUSH** — Write the enriched lead list (name, city, email, score, website, status) to the LEADS_ENRICHED tab of the mast
  when: after an enrichment run, or any time the sheet needs to match D1.
  args: $1 = rows per chunk (default 250, min 25, max 500). $2 = start offset (default 0). $3 = chunks this call (default 4, max 8). $4 = max rows total (default 0 = every enriched lead).
  doc: https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_PUSH&format=markdown
  run: https://miscsubjects.com/api/dispatch?invoke=LEADS_SHEET_PUSH&body=500%7C0%7C6&share=<TOKEN>
  history: https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_PUSH

### Troubleshooting
- If a row's example has placeholders, replace only the placeholder values and preserve separators.
- If a call fails, open its receipt and repair it with POST /api/dispatch {key, body, repairs:'inv_ID'}.
- If token scope denies this system, ask the owner for a row:/rows:/pfx: token scoped to the exact operation set.

Back to the tree: https://miscsubjects.com/api/dispatch?map=1&format=markdown