{
  "openapi": "3.1.0",
  "info": {
    "title": "SayNO — Public API & Developer Specification",
    "description": "Official public REST API surface and developer resources for the SayNO ecosystem and portfolio. Built by the Founder of SayNO (1m.btm), software developer & AI builder from Sahibganj (Jharkhand), studying in Kolkata (West Bengal, 12th Grade).\n\n### ⚡ REST Versioning & Deprecation Policy\n- **Versioning Scheme**: URL path versioning (`/api/v1/`).\n- **Deprecation Policy**: Any endpoint scheduled for retirement will return standard RFC 8594 `Deprecation: true` and `Sunset: <HTTP-date>` headers at least 6 months prior to removal.\n- **Error Model**: All errors conform to RFC 9457 `application/problem+json` format.\n- **Content Negotiation**: Supports `Accept: text/markdown` (via acceptmarkdown.com standard) and `Accept: application/json`.",
    "version": "1.0.0",
    "x-deprecation-policy": {
      "policy": "RFC 8594 Deprecation and Sunset headers with 6 months notice",
      "documentationUrl": "https://batman-7y3.pages.dev/developers#deprecation"
    },
    "contact": {
      "name": "Founder of SayNO",
      "email": "1m.btmnnn@gmail.com",
      "url": "https://batman-7y3.pages.dev/contact"
    },
    "license": {
      "name": "MIT License",
      "url": "https://batman-7y3.pages.dev/privacy"
    }
  },
  "servers": [
    {
      "url": "https://batman-7y3.pages.dev",
      "description": "Production Edge Server (Cloudflare Pages)"
    },
    {
      "url": "https://saynoapp.imbtm.workers.dev",
      "description": "SayNO Core Product Server (Cloudflare Workers)"
    }
  ],
  "paths": {
    "/api/v1/status": {
      "get": {
        "operationId": "getApiStatus",
        "summary": "Health and system status check",
        "description": "Returns the current health status, uptime, API version, and feature capabilities of the SayNO platform.",
        "tags": ["System"],
        "responses": {
          "200": {
            "description": "System health and capabilities response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profile": {
      "get": {
        "operationId": "getFounderProfile",
        "summary": "Founder profile and brand identity",
        "description": "Retrieves the public brand profile, role, location, and verified links for the Founder of SayNO (1m.btm).",
        "tags": ["Profile"],
        "responses": {
          "200": {
            "description": "Founder profile information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "getFeaturedProjects",
        "summary": "Featured projects and products",
        "description": "Returns the list of featured products and applications built by the founder, including the SayNO web application.",
        "tags": ["Projects"],
        "responses": {
          "200": {
            "description": "List of featured projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services": {
      "get": {
        "operationId": "getServicesOffered",
        "summary": "Engineering services and expertise",
        "description": "Returns core capabilities and service areas including Software Engineering, AI & Automation, Product Strategy, and MVP Development.",
        "tags": ["Services"],
        "responses": {
          "200": {
            "description": "List of engineering services",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServicesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contact": {
      "get": {
        "operationId": "getContactChannels",
        "summary": "Contact channels and agent instructions",
        "description": "Retrieves official contact channels, response turnaround times, and instructions for automated agent inquiries.",
        "tags": ["Contact"],
        "responses": {
          "200": {
            "description": "Contact channels and instructions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "description": "RFC 9457 Problem Details object for HTTP APIs",
        "required": ["type", "title", "status", "detail", "code", "resolution"],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://batman-7y3.pages.dev/developers/errors#resource-not-found"
          },
          "title": {
            "type": "string",
            "example": "Resource Not Found"
          },
          "status": {
            "type": "integer",
            "example": 404
          },
          "detail": {
            "type": "string",
            "example": "The requested API endpoint does not exist."
          },
          "instance": {
            "type": "string",
            "example": "/api/v1/invalid"
          },
          "code": {
            "type": "string",
            "example": "RESOURCE_NOT_FOUND"
          },
          "resolution": {
            "type": "string",
            "example": "Check /openapi.json for valid API endpoints."
          }
        }
      },
      "StatusResponse": {
        "type": "object",
        "required": ["status", "version", "service", "environment", "uptime", "features"],
        "properties": {
          "status": {
            "type": "string",
            "enum": ["healthy", "degraded", "maintenance"],
            "example": "healthy"
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "service": {
            "type": "string",
            "example": "SayNO Portfolio & Public API"
          },
          "environment": {
            "type": "string",
            "example": "production"
          },
          "uptime": {
            "type": "string",
            "example": "99.99%"
          },
          "features": {
            "type": "object",
            "properties": {
              "openApiSpec": { "type": "string", "format": "uri" },
              "agentIndex": { "type": "string", "format": "uri" },
              "developerPortal": { "type": "string", "format": "uri" },
              "contentNegotiation": { "type": "string" }
            }
          }
        }
      },
      "ProfileResponse": {
        "type": "object",
        "required": ["identity", "alias", "brand", "role", "location", "summary", "links"],
        "properties": {
          "identity": { "type": "string", "example": "Founder of SayNO" },
          "alias": { "type": "string", "example": "1m.btm" },
          "brand": { "type": "string", "example": "SayNO" },
          "role": { "type": "string", "example": "Founder · Software Developer & AI Builder" },
          "location": {
            "type": "object",
            "required": ["hometown", "current"],
            "properties": {
              "hometown": { "type": "string", "example": "Sahibganj, Jharkhand, India" },
              "current": { "type": "string", "example": "Kolkata, West Bengal, India" },
              "academicStatus": { "type": "string", "example": "12th Grade Student & Independent Builder" }
            }
          },
          "summary": { "type": "string" },
          "links": {
            "type": "object",
            "properties": {
              "website": { "type": "string", "format": "uri" },
              "github": { "type": "string", "format": "uri" },
              "x": { "type": "string", "format": "uri" },
              "instagram": { "type": "string", "format": "uri" },
              "telegram": { "type": "string", "format": "uri" },
              "contact": { "type": "string" }
            }
          }
        }
      },
      "ProjectsResponse": {
        "type": "object",
        "required": ["total", "projects"],
        "properties": {
          "total": { "type": "integer", "example": 3 },
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "number", "title", "category", "description", "url", "status"],
              "properties": {
                "id": { "type": "string", "example": "sayno" },
                "number": { "type": "string", "example": "01" },
                "title": { "type": "string", "example": "SayNO" },
                "category": { "type": "string", "example": "SAAS & CLOUD PRODUCT" },
                "description": { "type": "string" },
                "url": { "type": "string", "format": "uri" },
                "status": { "type": "string", "example": "active" }
              }
            }
          }
        }
      },
      "ServicesResponse": {
        "type": "object",
        "required": ["total", "services"],
        "properties": {
          "total": { "type": "integer", "example": 5 },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "required": ["id", "title", "category", "description"],
              "properties": {
                "id": { "type": "string", "example": "software-development" },
                "title": { "type": "string", "example": "Software Development" },
                "category": { "type": "string", "example": "ENGINEERING" },
                "description": { "type": "string" }
              }
            }
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "required": ["email", "identity", "brand", "responseTime", "channels", "instructionsForAgents"],
        "properties": {
          "email": { "type": "string", "format": "email", "example": "1m.btmnnn@gmail.com" },
          "identity": { "type": "string", "example": "Founder of SayNO" },
          "brand": { "type": "string", "example": "SayNO" },
          "responseTime": { "type": "string", "example": "24-48 hours" },
          "channels": {
            "type": "object",
            "properties": {
              "email": { "type": "string" },
              "telegram": { "type": "string", "format": "uri" },
              "x": { "type": "string", "format": "uri" },
              "instagram": { "type": "string", "format": "uri" },
              "reddit": { "type": "string", "format": "uri" }
            }
          },
          "instructionsForAgents": { "type": "string" }
        }
      }
    }
  }
}
