{"openapi":"3.1.1","info":{"title":"CMAC Roofing public retrieval API","version":"1.1.0","description":"Public, read-only retrieval interfaces for CMAC Roofing published pages and deterministic NLWeb search. No API key, account, OAuth flow, or permission scope is required. These operations cannot create leads, change site content, or perform commerce.","termsOfService":"https://cmac-new-concept.vercel.app/terms","license":{"name":"CMAC Roofing Terms of Service","url":"https://cmac-new-concept.vercel.app/terms"},"contact":{"name":"CMAC Roofing","url":"https://cmac-new-concept.vercel.app/contact","email":"info@cmacroofing.com"}},"servers":[{"url":"https://cmac-new-concept.vercel.app","description":"The CMAC deployment that served this description"}],"externalDocs":{"description":"CMAC developer and agent documentation","url":"https://cmac-new-concept.vercel.app/developers"},"security":[],"x-api-versioning-policy":{"current":"v1","compatibility":"Backward-compatible fields may be added within v1. Breaking request or response changes use a new major path.","deprecation":"Before a stable version is removed, CMAC will document migration guidance and send Deprecation and Link headers. A dated Sunset header will be announced at least 180 days before removal."},"tags":[{"name":"Catalog","description":"Enumerate public CMAC pages with cursor-based pagination."},{"name":"Content","description":"Read one published CMAC page in a structured representation."},{"name":"Search","description":"Search the same public PageDoc index used by the website."}],"paths":{"/api":{"get":{"operationId":"discoverCmacPublicApi","summary":"Discover the public retrieval API","description":"Returns the current major version and links to the OpenAPI contract and developer documentation.","security":[],"tags":["Catalog"],"responses":{"200":{"description":"API discovery document","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"406":{"description":"Requested representation is not available","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1":{"get":{"operationId":"discoverCmacPublicApiV1","summary":"Discover v1 retrieval operations","description":"Returns machine-readable links to every public, read-only v1 operation.","security":[],"tags":["Catalog"],"responses":{"200":{"description":"Versioned API operation index","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"406":{"description":"Requested representation is not available","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/pages":{"get":{"operationId":"listCmacPublishedPages","summary":"List published CMAC pages","description":"Returns the public page catalog with opaque cursor-based pagination. This versioned operation is read-only and requires no authentication.","security":[],"tags":["Catalog"],"parameters":[{"in":"query","name":"limit","required":false,"description":"Number of pages to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"in":"query","name":"cursor","required":false,"description":"Opaque pagination cursor returned as pagination.nextCursor by a previous response.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"One page of the published content catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageList"}}}},"400":{"description":"Invalid limit or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/page":{"get":{"operationId":"getCmacPublishedPageV1","summary":"Get one published CMAC page","description":"Returns canonical metadata and Markdown for one public CMAC path.","security":[],"tags":["Content"],"parameters":[{"in":"query","name":"path","required":false,"description":"Canonical content path. Defaults to the homepage.","schema":{"type":"string","pattern":"^/","maxLength":300,"default":"/"},"example":"/services/roofing/roof-repairs"}],"responses":{"200":{"description":"Published page representation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRepresentation"}}}},"400":{"description":"Invalid path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"The requested path is not a published CMAC page","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/search":{"get":{"operationId":"searchCmacPublishedPagesV1","summary":"Search published CMAC pages","description":"Runs deterministic keyword retrieval over public CMAC pages and returns cursor-paginated structured results.","security":[],"tags":["Search"],"parameters":[{"in":"query","name":"q","required":true,"description":"Search query.","schema":{"type":"string","minLength":1,"maxLength":500},"example":"roof repair in Dallas"},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"in":"query","name":"cursor","required":false,"description":"Opaque pagination cursor returned by a previous response.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"One page of deterministic search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"Invalid query, limit, or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/agent":{"get":{"operationId":"getCmacPublishedPage","summary":"Get one published CMAC page","description":"Compatibility alias for /api/v1/page. Returns canonical metadata and Markdown for a public CMAC content path.","security":[],"tags":["Content"],"parameters":[{"in":"query","name":"path","required":false,"description":"Canonical content path. Defaults to the homepage.","schema":{"type":"string","pattern":"^/","maxLength":300,"default":"/"},"example":"/services/roofing/roof-repairs"}],"responses":{"200":{"description":"Published page representation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageRepresentation"}}}},"404":{"description":"The requested path is not a published CMAC page","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/ask":{"get":{"operationId":"getCmacNlwebCapabilities","summary":"Describe the CMAC NLWeb endpoint","description":"Returns the supported NLWeb version, response format, mode, and a sample request.","security":[],"tags":["Search"],"parameters":[{"in":"query","name":"query","required":false,"description":"When present, execute a deterministic NLWeb search. When absent, return endpoint capabilities.","schema":{"type":"string","minLength":1,"maxLength":500}}],"responses":{"200":{"description":"NLWeb capability summary or deterministic search answer","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":true},{"$ref":"#/components/schemas/AskAnswer"},{"$ref":"#/components/schemas/AskFailure"}]}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskFailure"}}}}}},"post":{"operationId":"searchCmacPublishedContent","summary":"Search CMAC published content with NLWeb 0.55","description":"Runs deterministic list-mode retrieval over public CMAC pages. The operation is read-only, non-streaming, and requires no authentication.","security":[],"tags":["Search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"},"example":{"query":"roof repair in Dallas","prefer":{"mode":"list","response_format":"conversational_search"},"meta":{"version":"0.55"}}}}},"responses":{"200":{"description":"NLWeb answer or protocol-level failure such as no results","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AskAnswer"},{"$ref":"#/components/schemas/AskFailure"}]}}}},"400":{"description":"Malformed JSON or an invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskFailure"}}}}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","required":["type","title","status","detail","instance","code","resolution"],"properties":{"type":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"code":{"type":"string"},"resolution":{"type":"string"}},"additionalProperties":true},"PageSummary":{"type":"object","required":["@context","@type","name","description","url","path","dateModified"],"properties":{"@context":{"const":"https://schema.org"},"@type":{"type":"string","enum":["WebPage","Service","LocalBusiness"]},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"path":{"type":"string","pattern":"^/"},"dateModified":{"type":"string","format":"date"},"score":{"type":"number","minimum":0}}},"Pagination":{"type":"object","required":["limit","total","hasMore","nextCursor"],"properties":{"limit":{"type":"integer","minimum":1,"maximum":50},"total":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"PageList":{"type":"object","required":["apiVersion","items","pagination"],"properties":{"apiVersion":{"const":"v1"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PageSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"SearchResults":{"type":"object","required":["apiVersion","query","items","pagination"],"properties":{"apiVersion":{"const":"v1"},"query":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PageSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"PageRepresentation":{"type":"object","required":["@context","@type","name","description","url","dateModified","breadcrumbs","markdown"],"properties":{"@context":{"const":"https://schema.org"},"@type":{"type":"string","enum":["WebPage","Service","LocalBusiness"]},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"dateModified":{"type":"string","format":"date"},"breadcrumbs":{"type":"array","items":{"type":"object","required":["name","url"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"markdown":{"type":"string"}}},"AskRequest":{"type":"object","required":["query"],"properties":{"query":{"oneOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"object","required":["text"],"properties":{"text":{"type":"string","minLength":1,"maxLength":500},"site":{"type":"string"},"itemType":{"type":"string"}}}]},"prefer":{"type":"object","properties":{"streaming":{"const":false},"response_format":{"const":"conversational_search"},"mode":{"const":"list"}}},"meta":{"type":"object","properties":{"version":{"const":"0.55"}}}}},"AskAnswer":{"type":"object","required":["_meta","results"],"properties":{"_meta":{"type":"object","required":["response_type","response_format","version"],"properties":{"response_type":{"const":"answer"},"response_format":{"const":"conversational_search"},"version":{"const":"0.55"}}},"results":{"type":"array","items":{"type":"object","required":["@type","name","description","url"],"properties":{"@context":{"type":"string","format":"uri"},"@type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"dateModified":{"type":"string","format":"date"}},"additionalProperties":true}}}},"AskFailure":{"type":"object","required":["_meta","error"],"properties":{"_meta":{"type":"object","required":["response_type","version"],"properties":{"response_type":{"const":"failure"},"version":{"const":"0.55"}}},"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NO_RESULTS","INVALID_QUERY","UNSUPPORTED_FORMAT","UNSUPPORTED_MODE","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}},"x-cmac-access":{"authentication":"none","authorization":"none","permissions":["public:read"],"writes":false,"note":"public:read describes capability only; it is not an OAuth scope and clients do not request a token"}}