{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"slug":"oip-system-leads","title":"OIP system: LEADS","body":"## LEADS\n\nA 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.\n\nThis page is the operating article for one build subsystem. It is generated from live directory rows. If a task belongs to this subsystem, scan the operations below, open the matching capability article, run only the exact object named there, and verify by receipt.\n\nKind: `core`. Capabilities: `23`. Machine system map: [/api/dispatch?map=LEADS&format=markdown](https://miscsubjects.com/api/dispatch?map=LEADS&format=markdown). Root: [/a/oip](https://miscsubjects.com/a/oip).\n\n## Operations\n\n### LEADS_DISCOVER\nFind businesses likely to buy peptides wholesale or want white-label, by type and city. Free source (OpenStreetMap), no API key. Writes new rows to the leads table.\nUse when: start a new outreach batch for a place.\nArguments: `$1 = segment (medspa | clinic | wellness | gym | supplement), $2 = city, $3 = max results (default 40).`.\nHuman article: [/a/oip-capability-leads-discover](https://miscsubjects.com/a/oip-capability-leads-discover). Machine doc: [?key=LEADS_DISCOVER&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DISCOVER](https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER).\n\n### LEADS_ENRICH\nVisit one lead's website and pull the best contact email. Sets the lead to enriched or no_email.\nUse when: after discovery, to get an email to reach out to.\nArguments: `$1 = lead id.`.\nHuman article: [/a/oip-capability-leads-enrich](https://miscsubjects.com/a/oip-capability-leads-enrich). Machine doc: [?key=LEADS_ENRICH&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_ENRICH&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_ENRICH](https://miscsubjects.com/api/invocations?object_id=LEADS_ENRICH).\n\n### LEADS_DRAFT\nWrite a wholesale + white-label outreach email for one lead. Saves the draft on the lead. DOES NOT SEND.\nUse when: after enrich, to prepare the message for the owner to approve.\nArguments: `$1 = lead id, $2 = which company it comes from (default miscsubjects).`.\nHuman article: [/a/oip-capability-leads-draft](https://miscsubjects.com/a/oip-capability-leads-draft). Machine doc: [?key=LEADS_DRAFT&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DRAFT&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DRAFT](https://miscsubjects.com/api/invocations?object_id=LEADS_DRAFT).\n\n### LEADS_LIST\nList leads and a count by status (new, enriched, drafted, no_email, sent).\nUse when: see the outreach pipeline.\nArguments: `$1 = status filter (optional; blank = all).`.\nHuman article: [/a/oip-capability-leads-list](https://miscsubjects.com/a/oip-capability-leads-list). Machine doc: [?key=LEADS_LIST&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_LIST&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_LIST](https://miscsubjects.com/api/invocations?object_id=LEADS_LIST).\n\n### LEADS_ENRICH_BATCH\nEnrich the next batch of un-enriched leads in one call (finds emails + context). Bounded so it never fails; call repeatedly to work through the queue.\nUse when: after discovery, to fill in emails and context for many leads.\nArguments: `$1 = how many to do this call (default 8, max 10).`.\nHuman article: [/a/oip-capability-leads-enrich-batch](https://miscsubjects.com/a/oip-capability-leads-enrich-batch). Machine doc: [?key=LEADS_ENRICH_BATCH&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_ENRICH_BATCH&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_ENRICH_BATCH](https://miscsubjects.com/api/invocations?object_id=LEADS_ENRICH_BATCH).\n\n### LEADS_RUN_CITY\nOne call = discover a segment in a city, then enrich a batch. The fastest way to grow the pipeline.\nUse when: add a new city/segment to the pipeline.\nArguments: `$1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = discover limit (default 40), $4 = enrich count (default 8).`.\nHuman article: [/a/oip-capability-leads-run-city](https://miscsubjects.com/a/oip-capability-leads-run-city). Machine doc: [?key=LEADS_RUN_CITY&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_RUN_CITY&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_RUN_CITY](https://miscsubjects.com/api/invocations?object_id=LEADS_RUN_CITY).\n\n### LEADS_DRAFT_AI\nGrok drafts one review-only outreach email grounded in OUTREACH_DOSSIER and the business site. DOES NOT SEND. Hard-blocks unless email domain MX is verified, ICP score is at least 65, site context is sufficient, and recipient is not suppressed.\\n# WHEN_TO_USE: only after enrichment, MX verification, and ICP scoring.\\n# ARGS: $1=lead id, $2=brand (default LeoResearch).\\n# EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]\\n[\"$1\",\"$2\"]\nUse when: only after enrichment, MX verification, and ICP scoring.\\n# ARGS: $1=lead id, $2=brand (default LeoResearch).\\n# EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]\\n[\"$1\",\"$2\"]\nArguments: `$1=lead id, $2=brand (default LeoResearch).\\n# EX: [LEADS_DRAFT_AI]131|LeoResearch[/LEADS_DRAFT_AI]\\n[\"$1\",\"$2\"]`.\nHuman article: [/a/oip-capability-leads-draft-ai](https://miscsubjects.com/a/oip-capability-leads-draft-ai). Machine doc: [?key=LEADS_DRAFT_AI&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DRAFT_AI&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DRAFT_AI](https://miscsubjects.com/api/invocations?object_id=LEADS_DRAFT_AI).\n\n### LEADS_SEND\nSend ONE lead's already-saved email through the owner-reviewed Marketing admin.\nUse when: only after the owner reviewed the exact recipient, subject, and body in Admin → Marketing → Leads, approved that exact copy, and separately clicked Send.\nArguments: `$1=CONFIRM, $2=lead id, $3=from local-part, $4=owner-browser exact-copy approval token.`.\nHuman article: [/a/oip-capability-leads-send](https://miscsubjects.com/a/oip-capability-leads-send). Machine doc: [?key=LEADS_SEND&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SEND&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SEND](https://miscsubjects.com/api/invocations?object_id=LEADS_SEND).\n\n### LEADS_SEND_BATCH\nBatch outreach sending is disabled.\nUse when: never; use the owner-reviewed individual send path in Admin → Marketing → Leads.\nHuman article: [/a/oip-capability-leads-send-batch](https://miscsubjects.com/a/oip-capability-leads-send-batch). Machine doc: [?key=LEADS_SEND_BATCH&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SEND_BATCH&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SEND_BATCH](https://miscsubjects.com/api/invocations?object_id=LEADS_SEND_BATCH).\n\n### LEADS_DISCOVER_AI\nSCRAPER 2 — Grok live web search finds real businesses (with verified official websites) that OpenStreetMap does not have. Inserts them as new leads, source=grok-live-search.\nUse when: grow the pipeline in a city where LEADS_DISCOVER (OSM) returned few results, or to reach richer segments (longevity, weightloss, chiro).\nArguments: `$1 = segment (medspa|clinic|wellness|gym|supplement|chiro|massage|weightloss|longevity), $2 = city, $3 = count (default 20, cap 30).`.\nHuman article: [/a/oip-capability-leads-discover-ai](https://miscsubjects.com/a/oip-capability-leads-discover-ai). Machine doc: [?key=LEADS_DISCOVER_AI&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_AI&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DISCOVER_AI](https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_AI).\n\n### LEADS_FIND_SITES\nRescue websiteless leads — one Grok live-search call finds official websites for a batch of leads that have name+city but no site. Found leads stay status=new so LEADS_ENRICH_BATCH picks them up.\nUse when: when leads sit in status=new with no website (OSM often lacks the website tag) — they are unreachable until this runs.\nArguments: `$1 = batch size (default 8, cap 10).`.\nHuman article: [/a/oip-capability-leads-find-sites](https://miscsubjects.com/a/oip-capability-leads-find-sites). Machine doc: [?key=LEADS_FIND_SITES&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_FIND_SITES&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_FIND_SITES](https://miscsubjects.com/api/invocations?object_id=LEADS_FIND_SITES).\n\n### LEADS_REENRICH\nSecond pass over status=no_email leads with the deep crawler (mailto links, Cloudflare-obfuscated emails, JSON-LD, /contact-us + /about pages — none of which the v1 crawler read).\nUse when: rescue contactable emails from the no_email pool without any new discovery.\nArguments: `$1 = batch size (default 6, cap 8).`.\nHuman article: [/a/oip-capability-leads-reenrich](https://miscsubjects.com/a/oip-capability-leads-reenrich). Machine doc: [?key=LEADS_REENRICH&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_REENRICH&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_REENRICH](https://miscsubjects.com/api/invocations?object_id=LEADS_REENRICH).\n\n### LEADS_SWEEP\nMulti-city sweep — one segment across up to 3 cities (OSM discover per city) plus one enrich batch, in a single call.\nUse when: fastest way to open several new cities at once.\nArguments: `$1 = segment, $2 = comma-separated cities (max 3), $3 = per-city discover limit (default 40).`.\nHuman article: [/a/oip-capability-leads-sweep](https://miscsubjects.com/a/oip-capability-leads-sweep). Machine doc: [?key=LEADS_SWEEP&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SWEEP&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SWEEP](https://miscsubjects.com/api/invocations?object_id=LEADS_SWEEP).\n\n### LEADS_VERIFY_MX\nVerify whether the email domain publishes MX records using DNS-over-HTTPS. Tags mx:ok or mx:none. This verifies the domain, not the individual mailbox.\\n# WHEN_TO_USE: 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]\\n[\"$1\"]\nUse 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]\\n[\"$1\"]\nArguments: `$1=max leads (default 25, cap 50).\\n# EX: [LEADS_VERIFY_MX]25[/LEADS_VERIFY_MX]\\n[\"$1\"]`.\nHuman article: [/a/oip-capability-leads-verify-mx](https://miscsubjects.com/a/oip-capability-leads-verify-mx). Machine doc: [?key=LEADS_VERIFY_MX&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_VERIFY_MX&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_VERIFY_MX](https://miscsubjects.com/api/invocations?object_id=LEADS_VERIFY_MX).\n\n### LEADS_SCORE_AI\nAI ICP scoring — one Grok (grok-4.3) call scores a batch of enriched leads 0-100 on real wholesale/white-label peptide buying fit, grounded in OUTREACH_DOSSIER. Writes score + an icp: note (buyer type, volume guess, concrete reason) so LEADS_LIST ranks by commercial fit instead of has-a-website.\nUse when: after enrichment, before drafting; \"score the leads\", \"which leads are actually worth emailing\".\nArguments: `$1 = batch size (default 8, cap 10). Call repeatedly until it returns scored:0.`.\nHuman article: [/a/oip-capability-leads-score-ai](https://miscsubjects.com/a/oip-capability-leads-score-ai). Machine doc: [?key=LEADS_SCORE_AI&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SCORE_AI&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SCORE_AI](https://miscsubjects.com/api/invocations?object_id=LEADS_SCORE_AI).\n\n### LEADS_DISCOVER_PLACES\nDiscover B2B leads via Google Places API (New) — med-spas/clinics/longevity by segment + city, with website/phone/rating. Better coverage than the Overpass source. Inserts into the leads table.\nUse when: \"find medspas in Newport Beach\", building the wholesale target list.\nArguments: `$1=segment free text (e.g. \"medical spa\",\"longevity clinic\"), $2=city, $3=limit (default 40).`.\nHuman article: [/a/oip-capability-leads-discover-places](https://miscsubjects.com/a/oip-capability-leads-discover-places). Machine doc: [?key=LEADS_DISCOVER_PLACES&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_PLACES&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DISCOVER_PLACES](https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_PLACES).\n\n### LEADS_RESOLVE_SITES\nBackfill missing websites on siteless leads (NPPES rows have name + phone + address but never a website) so the enrichment crawler can reach them. Looks the practice up on Google Places BY PHONE NUMBER, then requires the Google name to share a word with the registry name before it writes anything — a phone that now answers for a billing company or an unrelated business is recorded as a mismatch and never written. Every attempt is stamped into notes as resolve:ok | name_mismatch | no_website | no_place, so a lead is only ever paid for once and the queue always advances.\nUse when: after LEADS_DISCOVER_NPI, before enrichment.\nArguments: `$1=limit (default 20, max 30). $2=segment LIKE filter, e.g. chiro (optional; blank = any segment).`.\nHuman article: [/a/oip-capability-leads-resolve-sites](https://miscsubjects.com/a/oip-capability-leads-resolve-sites). Machine doc: [?key=LEADS_RESOLVE_SITES&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_RESOLVE_SITES&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_RESOLVE_SITES](https://miscsubjects.com/api/invocations?object_id=LEADS_RESOLVE_SITES).\n\n### LEADS_FOLLOWUPS\nGenerate the follow-up sequence (touch 2 new-angle + touch 3 break-up) for an already-drafted lead, on the same thread. DOES NOT SEND. Stored on the lead draft as {followups:{touch2,touch3}}.\nUse when: after LEADS_DRAFT_AI has produced the first touch; before sending, so the whole 3-touch sequence is staged for review.\nArguments: `$1=lead id, $2=brand (default LeoResearch).`.\nHuman article: [/a/oip-capability-leads-followups](https://miscsubjects.com/a/oip-capability-leads-followups). Machine doc: [?key=LEADS_FOLLOWUPS&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_FOLLOWUPS&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_FOLLOWUPS](https://miscsubjects.com/api/invocations?object_id=LEADS_FOLLOWUPS).\n\n### LEADS_DISCOVER_ORG\nSCRAPER 5 — organization discovery for a promo class via live web search. Finds real organizations with verifiable official sites and inserts them as leads (segment = class key, source = org-research), deduped on name+city. Emails are NEVER guessed here: LEADS_ENRICH finds them on the organization's own site or the row ends no_email.\nUse when: populating a promo class with real organizations before enrichment; \"find AI assurance firms\".\nArguments: `$1 = promo class key (must exist in promo_classes), $2 = free-text query, $3 = count (default 12, cap 20).`.\nHuman article: [/a/oip-capability-leads-discover-org](https://miscsubjects.com/a/oip-capability-leads-discover-org). Machine doc: [?key=LEADS_DISCOVER_ORG&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_ORG&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DISCOVER_ORG](https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_ORG).\n\n### LEADS_DISCOVER_NPI\nDiscover leads from the NPPES NPI Registry (authoritative federal provider directory, free/no key). Real clinic identity + phone + address; no website (run LEADS_RESOLVE_SITES to backfill).\nUse when: broad authoritative discovery of clinics/providers by taxonomy + city/state.\nArguments: `$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).`.\nHuman article: [/a/oip-capability-leads-discover-npi](https://miscsubjects.com/a/oip-capability-leads-discover-npi). Machine doc: [?key=LEADS_DISCOVER_NPI&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_DISCOVER_NPI&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_DISCOVER_NPI](https://miscsubjects.com/api/invocations?object_id=LEADS_DISCOVER_NPI).\n\n### LEADS_SHEET_SYNC\nInvokable OIP capability.\nUse when: \"put the lead segment/source breakdown on the sheet\", \"sync the lead sheet\" (run\nHuman article: [/a/oip-capability-leads-sheet-sync](https://miscsubjects.com/a/oip-capability-leads-sheet-sync). Machine doc: [?key=LEADS_SHEET_SYNC&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_SYNC&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SHEET_SYNC](https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_SYNC).\n\n### LEADS_SHEET_ENRICHED\nInvokable OIP capability.\nHuman article: [/a/oip-capability-leads-sheet-enriched](https://miscsubjects.com/a/oip-capability-leads-sheet-enriched). Machine doc: [?key=LEADS_SHEET_ENRICHED&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_ENRICHED&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SHEET_ENRICHED](https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_ENRICHED).\n\n### LEADS_SHEET_PUSH\nWrite the enriched lead list (name, city, email, score, website, status) to the LEADS_ENRICHED tab of the master sheet, in chunks, reporting how many rows the Apps Script itself confirmed writing.\nUse when: after an enrichment run, or any time the sheet needs to match D1.\nArguments: `$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).`.\nHuman article: [/a/oip-capability-leads-sheet-push](https://miscsubjects.com/a/oip-capability-leads-sheet-push). Machine doc: [?key=LEADS_SHEET_PUSH&format=markdown](https://miscsubjects.com/api/dispatch?key=LEADS_SHEET_PUSH&format=markdown). Invocation history: [/api/invocations?object_id=LEADS_SHEET_PUSH](https://miscsubjects.com/api/invocations?object_id=LEADS_SHEET_PUSH).\n","register":"oip_protocol","tags":["oip","object-invocation-protocol","protocol-specification","machine-native-json","system"],"style":{"accent":"#16324f","measure":860},"claims":[{"id":"oip-c1","tier":"system","text":"The OIP article layer is generated from live directory rows, so it documents the objects that actually run the reference implementation.","who_claims":"system/oip_articles","source_ids":["oip-s3","oip-s4"]},{"id":"oip-c2","tier":"system","text":"The OIP operating path is caller to directory object to dispatch runner to invocation ledger to receipt.","who_claims":"system/oip_articles","source_ids":["oip-s1"]},{"id":"oip-c3","tier":"system","text":"Every executable capability in the reference implementation is reachable as an OIP object with a human article, a machine document, invocation history, and receipt path.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s3"]},{"id":"oip-c4","tier":"system","text":"Tap & Go is the copy primitive: one drop carries credential, protocol, tree, search, execute, and receipt instructions without a separate token-map-bundle assembly step.","who_claims":"system/oip_articles","source_ids":["oip-s2"]},{"id":"oip-c5","tier":"system","text":"OIP receipts are the proof object for actions: they record request, response, actor, links, replay, repair, and lineage.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s5"]}],"sources":[{"id":"oip-s1","type":"protocol","title":"BUILD_SPEC object invocation path","url":"https://miscsubjects.com/api/file/docs/BUILD_SPEC.md","summary":"Defines directory rows, dispatch, ledger, and the escalation path for changing the build.","quote":"Run anything: POST https://miscsubjects.com/api/dispatch {key, body}","claim_ids":["oip-c2"],"link_status":"ok","hash":"oipbuildspec0001"},{"id":"oip-s2","type":"protocol","title":"Object Invocation Protocol spec","url":"https://miscsubjects.com/api/file/docs/OIP.md","summary":"Defines OIP surfaces, invariant loop, receipt/replay/repair, and invocation envelopes.","quote":"identify, explain, invoke, ledger, yield","claim_ids":["oip-c3","oip-c4","oip-c5"],"link_status":"ok","hash":"oipspec00000002"},{"id":"oip-s3","type":"protocol","title":"Live OIP capability tree","url":"https://miscsubjects.com/api/dispatch?map=1&format=markdown","summary":"Public recursive capability tree.","quote":"root > shelf > system article > capability article > receipt","claim_ids":["oip-c1","oip-c3"],"link_status":"ok","hash":"oipmap0000000002"},{"id":"oip-s4","type":"protocol","title":"Directory row documentation","url":"https://miscsubjects.com/api/dispatch?key=OIP_TREE&format=markdown","summary":"Capability articles are generated from live rows.","quote":"Machine Contract","claim_ids":["oip-c1"],"link_status":"ok","hash":"oiprow0000000003"},{"id":"oip-s5","type":"protocol","title":"Invocation ledger","url":"https://miscsubjects.com/api/invocations","summary":"Append-only invocation records and receipt links.","quote":"invocations","claim_ids":["oip-c5"],"link_status":"ok","hash":"oipinvocations0005"}],"prov":{"model":"system/oip_articles","action":"generate"}}