{"openapi":"3.1.0","info":{"title":"Pindrop Lead Intelligence & Prospecting API","version":"1.0.0","description":"Production REST API and Agent Action specification for Pindrop. Discover local businesses via Google Maps, perform real-time mobile speed audits, generate high-converting AI cold pitches, and sync deals into CRM pipelines.","contact":{"name":"Pindrop Agent Support","url":"https://pindrop.lol","email":"agents@pindrop.lol"}},"servers":[{"url":"https://pindrop.lol","description":"Production Server"},{"url":"http://localhost:3002","description":"Local Development Server"}],"paths":{"/api/places":{"post":{"operationId":"searchGooglePlaces","summary":"Search Local Businesses on Google Maps","description":"Query Google Places API for verified local businesses by industry and city, returning ratings, review count, address, and website URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query (e.g., 'coffee shops in Denver, CO' or 'roofers in Dallas, TX')","example":"Coffee shops in Denver, CO"}},"required":["query"]}}}},"responses":{"200":{"description":"Successfully retrieved local business leads","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}}}}}}}}}},"/api/discover":{"post":{"operationId":"discoverLeadsWithFitScore","summary":"Discover & Automatically Qualify Prospects","description":"Full-pipeline lead discovery that searches Google Maps and scores each prospect with a Fit Score (0-100) based on mobile speed, reviews, and website status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","example":"Dentists in Austin, TX"},"location":{"type":"string","example":"Austin, TX"},"niche":{"type":"string","example":"Dentists"}},"required":["query"]}}}},"responses":{"200":{"description":"Discovered and scored prospects","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}}}}}}}}}},"/api/agent/analyze":{"post":{"operationId":"auditWebsitePerformance","summary":"Audit Prospect Website & Tech Stack","description":"Performs automated mobile speed check (LCP), tech stack detection (WordPress, Shopify, Webflow), and revenue leak estimation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leadId":{"type":"string"},"url":{"type":"string","format":"uri","example":"https://hazelandbeancoffee.com"}},"required":["url"]}}}},"responses":{"200":{"description":"Website audit results and identified revenue gaps","content":{"application/json":{"schema":{"type":"object","properties":{"lcpSeconds":{"type":"number","example":4.2},"leakEstimatedMonthly":{"type":"number","example":3200},"detectedStack":{"type":"string","example":"WordPress + WooCommerce"},"auditSummary":{"type":"string"}}}}}}}}},"/api/agent/email":{"post":{"operationId":"generateTailoredPitch","summary":"Generate AI Cold Outreach Sequence","description":"Drafts personalized cold email sequences citing specific mobile speed gaps and local market position.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"businessName":{"type":"string","example":"Hazel & Bean Coffee Co."},"decisionMakerName":{"type":"string","example":"Marcus Vance"},"mobileSpeedGap":{"type":"string","example":"4.2s mobile LCP load time"},"niche":{"type":"string","example":"Coffee Roaster"}},"required":["businessName"]}}}},"responses":{"200":{"description":"AI tailored cold email draft","content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"bodyText":{"type":"string"},"bodyHtml":{"type":"string"}}}}}}}}},"/api/email/send":{"post":{"operationId":"sendEmailOutreach","summary":"Dispatch Cold Email via Resend / SMTP","description":"Sends the generated pitch sequence directly to the prospect's verified email address with reply tracking.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","format":"email","example":"marcus@hazelandbeancoffee.com"},"subject":{"type":"string","example":"Quick question regarding mobile checkout on Hazel & Bean"},"html":{"type":"string"}},"required":["to","subject","html"]}}}},"responses":{"200":{"description":"Email successfully dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","example":"sent"}}}}}}}}}},"components":{"schemas":{"Lead":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","example":"Hazel & Bean Coffee Co."},"address":{"type":"string","example":"1738 E Evans Ave, Denver, CO"},"phone":{"type":"string","example":"(303) 555-0192"},"website":{"type":"string","example":"https://hazelandbeancoffee.com"},"rating":{"type":"number","example":4.8},"reviewCount":{"type":"integer","example":312},"fitScore":{"type":"integer","example":96},"status":{"type":"string","enum":["new","qualified","contacted","won"]}}}},"securitySchemes":{"GooglePlacesKey":{"type":"apiKey","in":"header","name":"x-google-places-api-key"},"GeminiKey":{"type":"apiKey","in":"header","name":"x-gemini-api-key"},"ResendKey":{"type":"apiKey","in":"header","name":"x-resend-api-key"}}}}