{
  "openapi": "3.1.0",
  "info": {
    "title": "Cost-Effective Software Public API",
    "version": "1.0.0",
    "summary": "Public API of Cost-Effective Software (costeffective.software).",
    "description": "Public, unauthenticated endpoints of Cost-Effective Software — custom software and AI automation for businesses.\n\nBeyond this REST surface:\n- A read-only MCP server (Streamable HTTP) at https://www.costeffective.software/mcp — server card at https://www.costeffective.software/.well-known/mcp/server-card.json\n- Markdown mirrors of every public page at https://www.costeffective.software/md/{path}; pages also honour `Accept: text/markdown`\n- Agent authentication guide at https://www.costeffective.software/auth.md\n- Site guide for AI agents at https://www.costeffective.software/llms.txt",
    "contact": {
      "name": "Cost-Effective Software",
      "url": "https://www.costeffective.software/developers",
      "email": "team@costeffective.software"
    }
  },
  "servers": [
    {
      "url": "https://www.costeffective.software",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Developer resources",
    "url": "https://www.costeffective.software/developers"
  },
  "tags": [
    {
      "name": "status",
      "description": "Service status"
    },
    {
      "name": "leads",
      "description": "Consultation / contact requests"
    },
    {
      "name": "content",
      "description": "Machine-readable site content"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "status"
        ],
        "summary": "Service health check",
        "responses": {
          "200": {
            "description": "Service is up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "operationId": "requestConsultation",
        "tags": [
          "leads"
        ],
        "summary": "Submit a consultation / contact request",
        "description": "Sends a lead to the Cost-Effective Software team. Same action as the MCP tool `request_consultation`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid fields (name, email and message are required)"
          },
          "500": {
            "description": "Delivery failed"
          }
        }
      }
    },
    "/md/{path}": {
      "get": {
        "operationId": "getMarkdownMirror",
        "tags": [
          "content"
        ],
        "summary": "Markdown mirror of a public page",
        "description": "Token-efficient markdown rendition of any public page, e.g. `/md/careers` or `/md` for the homepage. May contain `/` separators.",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "careers"
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown rendition of the page",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No such page"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiSpec",
        "tags": [
          "content"
        ],
        "summary": "This OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": [
          "content"
        ],
        "summary": "llms.txt site guide for AI agents",
        "responses": {
          "200": {
            "description": "llms.txt document",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the requester"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Reply-to email address"
          },
          "company": {
            "type": "string",
            "description": "Company name (optional)"
          },
          "message": {
            "type": "string",
            "description": "What you want to build or automate"
          }
        },
        "required": [
          "name",
          "email",
          "message"
        ]
      },
      "ContactResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ]
      }
    }
  }
}