{
  "openapi": "3.1.0",
  "info": {
    "title": "DayTwoAI Agent API",
    "version": "1.0.0",
    "description": "Machine-readable endpoints for AI agents researching DayTwoAI — an AI-native solution integrator offering Agentic Data Flows, Vision AI, and Gen AI Co-Development.",
    "contact": {
      "name": "DayTwoAI",
      "email": "contact@daytwoai.com",
      "url": "https://daytwoai.com"
    }
  },
  "servers": [
    { "url": "https://daytwoai.com", "description": "Production" }
  ],
  "paths": {
    "/api/context": {
      "get": {
        "operationId": "getContext",
        "summary": "Company context",
        "description": "Full structured profile: company identity, all three solutions with details, engagement model phases, commitments, target clients, and agent instructions. Returns JSON by default or Markdown when Accept: text/markdown is sent.",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "Response format. Use text/markdown for a clean markdown document.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["application/json", "text/markdown"],
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Company context",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Context" }
              },
              "text/markdown": {
                "schema": { "type": "string", "description": "Markdown-formatted company context" }
              }
            }
          }
        }
      }
    },
    "/api/onepager-pdf": {
      "get": {
        "operationId": "getOnepagerPDF",
        "summary": "One-pager PDF",
        "description": "Server-rendered PDF one-pager covering all solutions, engagement model, commitments, and contact information.",
        "responses": {
          "200": {
            "description": "PDF document",
            "content": {
              "application/pdf": {
                "schema": { "type": "string", "format": "binary" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Context": {
        "type": "object",
        "description": "Complete DayTwoAI company profile for agent consumption",
        "properties": {
          "company": {
            "type": "object",
            "properties": {
              "name": { "type": "string" },
              "tagline": { "type": "string" },
              "sublabel": { "type": "string" },
              "type": { "type": "string" },
              "description": { "type": "string" },
              "email": { "type": "string", "format": "email" },
              "url": { "type": "string", "format": "uri" }
            }
          },
          "solutions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "name": { "type": "string" },
                "url": { "type": "string", "format": "uri" },
                "description": { "type": "string" },
                "details": { "type": "array", "items": { "type": "string" } },
                "verticals": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "engagementModel": {
            "type": "object",
            "properties": {
              "description": { "type": "string" },
              "phases": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "step": { "type": "string" },
                    "name": { "type": "string" },
                    "description": { "type": "string" }
                  }
                }
              }
            }
          },
          "commitments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": { "type": "string" },
                "description": { "type": "string" }
              }
            }
          },
          "targetClients": {
            "type": "array",
            "items": { "type": "string" }
          },
          "agentInstructions": { "type": "string" }
        }
      }
    }
  }
}
