{"openapi":"3.1.0","info":{"title":"LAKA Funnel Grammar API","version":"1.0.0","summary":"Public read API for the LAKA Funnel Grammar, plus a funnel-page outline validator.","description":"The LAKA marketing grid (8 variables × 4 change levels); the six-stage funnel grammar; the page-section grammar; the copy rules; the email nurture grammar; the execution-platform domain model; the HouseSmart worked case study; and POST /v1/validate, which checks a funnel-page outline against the published schema and the grammar itself. This API is a methodology reference — not an advertising service or a performance guarantee.","contact":{"name":"Bow Tie Kreative","url":"https://bowtiekreative.com"}},"servers":[{"url":"https://marketing.bowtiekreative.com"}],"paths":{"/v1":{"get":{"summary":"Service index","operationId":"index","responses":{"200":{"description":"Service metadata and endpoint list"}}}},"/v1/health":{"get":{"summary":"Liveness and corpus counts","operationId":"health","responses":{"200":{"description":"Status and counts"}}}},"/v1/openapi.json":{"get":{"summary":"This document","operationId":"openapi","responses":{"200":{"description":"OpenAPI 3.1"}}}},"/v1/manifest":{"get":{"summary":"Package manifest and inventory","operationId":"manifest","responses":{"200":{"description":"Manifest"}}}},"/v1/grid":{"get":{"summary":"The LAKA marketing grid: 8 variables × 4 change levels","operationId":"grid","responses":{"200":{"description":"The grid"}}}},"/v1/stages":{"get":{"summary":"The six funnel stages","operationId":"listStages","responses":{"200":{"description":"A list","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/StageSummary"}}}}}}}}}},"/v1/stages/{id}":{"get":{"summary":"One funnel stage, with required sections and decision rules","operationId":"getStage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["position","homepage","segment-page","assessment","nurture","booking"]},"example":"homepage"}],"responses":{"200":{"description":"The stage"},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"const":"not_found"},"id":{"type":"string"}}}}}}}}},"/v1/sections":{"get":{"summary":"The page-section grammar","operationId":"listSections","responses":{"200":{"description":"A list","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SectionSummary"}}}}}}}}}},"/v1/sections/{id}":{"get":{"summary":"One section type, with required elements and copy rules","operationId":"getSection","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["hero","problem","mechanism","process","domains","segments","proof","risk-reversal","faq","assessment-steps","final-cta"]},"example":"hero"}],"responses":{"200":{"description":"The section"},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"const":"not_found"},"id":{"type":"string"}}}}}}}}},"/v1/rules":{"get":{"summary":"The copy rules — filter by category, severity or q","operationId":"listRules","parameters":[{"name":"category","in":"query","schema":{"enum":["seo","hero","cta","structure","voice","honesty","email"]}},{"name":"severity","in":"query","schema":{"enum":["must","should"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Free-text filter over id, statement and rationale"}],"responses":{"200":{"description":"A list","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}}}}}}}}}},"/v1/rules/{id}":{"get":{"summary":"One copy rule","operationId":"getRule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"MG-CTA-001"}],"responses":{"200":{"description":"The rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"const":"not_found"},"id":{"type":"string"}}}}}}}}},"/v1/emails":{"get":{"summary":"The email nurture grammar and archetypes","operationId":"emails","responses":{"200":{"description":"Sequence rules, archetypes and the case-study sequence"}}}},"/v1/platform":{"get":{"summary":"The execution-platform domain model","operationId":"platform","responses":{"200":{"description":"Domain graph, integrity rules, and how the grammar feeds it"}}}},"/v1/example":{"get":{"summary":"The HouseSmart worked case study, structured","operationId":"example","responses":{"200":{"description":"Position, grid, segments, offer ladder, funnel flow, metrics"}}}},"/v1/schema":{"get":{"summary":"The JSON Schema for a funnel-page outline","operationId":"schema","responses":{"200":{"description":"JSON Schema (draft 2020-12)"}}}},"/v1/sources":{"get":{"summary":"The source register and boundaries","operationId":"sources","responses":{"200":{"description":"Sources"}}}},"/v1/docs":{"get":{"summary":"The case-study documents","operationId":"docs","responses":{"200":{"description":"Document list"}}}},"/v1/docs/{slug}":{"get":{"summary":"One case-study document, as markdown","operationId":"getDoc","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"example":"homepage-copy"}],"responses":{"200":{"description":"Markdown text","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"const":"not_found"},"id":{"type":"string"}}}}}}}}},"/v1/validate":{"post":{"summary":"Validate a funnel-page outline against the schema and the grammar","operationId":"validateOutline","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A funnel-page outline; see /v1/schema."}}}},"responses":{"200":{"description":"Validation outcome","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"error_count":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"},"rule":{"type":"string","description":"The copy-rule id this error enforces, when applicable"}}}}}}}}},"400":{"description":"The body was not a JSON object"}}}}},"components":{"schemas":{"StageSummary":{"type":"object","properties":{"id":{"type":"string","example":"homepage"},"name":{"type":"string"},"order":{"type":"integer"},"job":{"type":"string"},"href":{"type":"string"}}},"SectionSummary":{"type":"object","properties":{"id":{"type":"string","example":"hero"},"name":{"type":"string"},"job":{"type":"string"},"href":{"type":"string"}}},"Rule":{"type":"object","properties":{"id":{"type":"string","example":"MG-CTA-001"},"category":{"type":"string"},"severity":{"enum":["must","should"]},"statement":{"type":"string"},"rationale":{"type":"string"},"applies_to":{"type":"array","items":{"type":"string"}},"machine_checkable":{"type":"boolean"}}}}}}