{"openapi":"3.0.3","info":{"title":"Leadee API","version":"0.1.0","description":"Planned API surface for Leadee.ai, a GEO (generative engine optimization) measurement and fix platform. Only POST /v1/free-scan is live today; every other path here documents the intended request/response shape ahead of implementation (see docs/specs/geo-platform-spec.md §3, modules M1-M6)."},"servers":[{"url":"https://api.leadee.ai/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"Workspace-scoped Leadee API key."}},"schemas":{"ConfidenceMetric":{"type":"object","properties":{"value":{"type":"number","example":0.62},"ci_low":{"type":"number","example":0.51},"ci_high":{"type":"number","example":0.72}}}}},"paths":{"/free-scan":{"post":{"summary":"Run a free AI crawlability scan (live)","description":"Module M1 (Audit). The only endpoint in this document that is callable today.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","example":"example.com"}}}}}},"responses":{"200":{"description":"Scan result","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"overallScore":{"type":"integer","example":58},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"score":{"type":"integer"}}}}}}}}}}}},"/visibility-tracker/runs":{"post":{"summary":"Start a Visibility Tracker run (planned)","description":"Module M2. Runs a prompt set against the selected AI engines.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["brand_id","prompt_set_id","engines"],"properties":{"brand_id":{"type":"string","example":"brand_01H4JEY"},"prompt_set_id":{"type":"string","example":"ps_01H4K2A"},"engines":{"type":"array","items":{"type":"string","enum":["chatgpt","ai_overviews","perplexity","gemini","claude","copilot"]}}}}}}},"responses":{"202":{"description":"Run queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"run_9f2c"},"status":{"type":"string","example":"queued"}}}}}}}}},"/visibility-tracker/runs/{runId}":{"get":{"summary":"Read Visibility Tracker run results (planned)","description":"Module M2. Returns mention rate, citation rate, position, share of voice and sentiment, each with a 95% confidence interval.","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Run result","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","example":"completed"},"metrics":{"type":"object","properties":{"mention_rate":{"$ref":"#/components/schemas/ConfidenceMetric"},"citation_rate":{"$ref":"#/components/schemas/ConfidenceMetric"},"share_of_voice":{"$ref":"#/components/schemas/ConfidenceMetric"}}}}}}}}}}},"/prompts":{"post":{"summary":"Generate a prompt set (planned)","description":"Module M3 (Prompt Discovery). Generates prompts from a brand, competitor list or keyword set.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["brand_id"],"properties":{"brand_id":{"type":"string"},"seed_keywords":{"type":"array","items":{"type":"string"}},"country":{"type":"string","example":"US"}}}}}},"responses":{"201":{"description":"Prompt set created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"prompt_count":{"type":"integer"}}}}}}}}},"/citations":{"get":{"summary":"List citations (planned)","description":"Module M4 (Citation Graph). Domains and URLs AI engines cited for a brand's prompt set.","parameters":[{"name":"brand_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Citations list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"domain":{"type":"string"},"cited_for_brand":{"type":"boolean"},"engine":{"type":"string"}}}}}}}}}}}},"/fix-engine/tickets":{"get":{"summary":"List Fix Engine tickets (planned)","description":"Module M5. Fix tickets generated from a Visibility Tracker run.","parameters":[{"name":"brand_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","resolved"]}}],"responses":{"200":{"description":"Ticket list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","example":"schema_fix"},"status":{"type":"string"},"summary":{"type":"string"}}}}}}}}}}}},"/ai-traffic/events":{"post":{"summary":"Report an AI crawler/referral event (planned)","description":"Module M6 (AI Traffic). Server/CDN log ingestion for AI bot visits and AI-referred traffic.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","user_agent"],"properties":{"url":{"type":"string"},"user_agent":{"type":"string","example":"GPTBot"},"occurred_at":{"type":"string","format":"date-time"}}}}}},"responses":{"202":{"description":"Event accepted"}}}}}}