{
  "openapi": "3.1.0",
  "info": {
    "title": "dealflow.fyi API",
    "version": "1.0.0",
    "summary": "Public, keyless surfaces of dealflow.fyi — a living M&A data room and deal service.",
    "description": "The machine-readable surface of dealflow.fyi. Everything here is public and requires no key: liveness, the waitlist/access endpoint, and the discovery documents (llms.txt, agent capability card, ICP, MCP discovery). Product operations that read a seller's live systems require an engagement and are not exposed here.",
    "contact": {
      "name": "dealflow.fyi",
      "email": "team@do.industries",
      "url": "https://dealflow.fyi/contact"
    }
  },
  "servers": [{ "url": "https://dealflow.fyi", "description": "Production" }],
  "externalDocs": {
    "description": "llms.txt — site guide for agents",
    "url": "https://dealflow.fyi/llms.txt"
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Keyless liveness check",
        "responses": {
          "200": {
            "description": "Service is live",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["status", "service"],
                  "properties": {
                    "status": { "type": "string", "const": "ok" },
                    "service": { "type": "string" },
                    "time": { "type": "string", "format": "date-time" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist": {
      "post": {
        "operationId": "joinWaitlist",
        "summary": "Request access / join the waitlist",
        "description": "Register interest as a seller (default) or acquirer (intent: buy). The only required field is a valid email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email"],
                "properties": {
                  "email": { "type": "string", "format": "email" },
                  "intent": { "type": "string", "enum": ["sell", "buy"], "default": "sell" },
                  "company": {
                    "type": "string",
                    "description": "Company name (sell) or the firm's URL (buy)."
                  },
                  "name": { "type": "string" },
                  "strategy": { "type": "string" },
                  "targetTypes": { "type": "array", "items": { "type": "string" } },
                  "industries": { "type": "array", "items": { "type": "string" } },
                  "arr": { "type": "array", "items": { "type": "string" } },
                  "check": { "type": "array", "items": { "type": "string" } },
                  "timeline": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["ok"],
                  "properties": { "ok": { "type": "boolean", "const": true } }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (bad JSON or invalid email)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean", "const": false },
                    "error": { "type": "string", "enum": ["bad_request", "invalid_email"] }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Downstream delivery failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean", "const": false },
                    "error": { "type": "string", "const": "delivery_failed" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "Site guide for language models",
        "responses": {
          "200": {
            "description": "Plain-text site guide",
            "content": { "text/plain": { "schema": { "type": "string" } } }
          }
        }
      }
    },
    "/.well-known/agents.json": {
      "get": {
        "operationId": "getAgentsCard",
        "summary": "Agent capability card",
        "responses": {
          "200": {
            "description": "Capabilities, pricing, integrations, and when-to-use guidance",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/icp.json": {
      "get": {
        "operationId": "getIcp",
        "summary": "Ideal customer profile for self-classification",
        "responses": {
          "200": {
            "description": "Who this is for",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "operationId": "getMcpManifest",
        "summary": "MCP server discovery manifest (points to the Streamable HTTP endpoint at POST /mcp)",
        "responses": {
          "200": {
            "description": "MCP endpoint enumeration and transport",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "This OpenAPI document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 contract",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    }
  }
}
