{
  "openapi": "3.1.0",
  "info": {
    "title": "VEducate Academy & ZapSkill Public API",
    "version": "1.0.0",
    "description": "Public machine-readable API for VEducate Academy publications, technical articles, author credentials, taxonomy metadata, and institutional contact inquiries."
  },
  "servers": [
    {
      "url": "https://veducateacademy.com",
      "description": "Primary Production Gateway"
    }
  ],
  "paths": {
    "/api/blog/articles": {
      "get": {
        "summary": "List published articles",
        "description": "Retrieves paginated list of published educational articles, filtered by category, tag, author, or search query.",
        "parameters": [
          { "name": "page", "in": "query", "schema": { "type": "integer", "default": 1 }, "description": "Page number" },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 10 }, "description": "Items per page" },
          { "name": "category", "in": "query", "schema": { "type": "string" }, "description": "Category slug filter" },
          { "name": "tag", "in": "query", "schema": { "type": "string" }, "description": "Tag slug filter" },
          { "name": "author", "in": "query", "schema": { "type": "string" }, "description": "Author slug filter" },
          { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Full-text search query" }
        ],
        "responses": {
          "200": {
            "description": "List of published articles with pagination metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": { "type": "array", "items": { "type": "object" } },
                    "pagination": { "type": "object" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/blog/articles/{slug}": {
      "get": {
        "summary": "Retrieve article by slug",
        "description": "Returns full article content, author profile, featured media, category, and related publications.",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Article URL slug" }
        ],
        "responses": {
          "200": {
            "description": "Detailed article record",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object" } } }
              }
            }
          },
          "404": { "description": "Article not found" }
        }
      }
    },
    "/api/blog/categories": {
      "get": {
        "summary": "List publication categories",
        "description": "Returns all active categories including article count and navigation ordering.",
        "responses": {
          "200": {
            "description": "List of active categories",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "array", "items": { "type": "object" } } } }
              }
            }
          }
        }
      }
    },
    "/api/blog/tags": {
      "get": {
        "summary": "List publication tags",
        "description": "Returns all indexed topic tags.",
        "responses": {
          "200": {
            "description": "List of topic tags",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "array", "items": { "type": "object" } } } }
              }
            }
          }
        }
      }
    },
    "/api/blog/authors": {
      "get": {
        "summary": "List author profiles",
        "description": "Returns verified authors, credentials, biographies, and publication counts.",
        "responses": {
          "200": {
            "description": "List of author profiles",
            "content": {
              "application/json": {
                "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "array", "items": { "type": "object" } } } }
              }
            }
          }
        }
      }
    },
    "/api/blog/authors/{slug}": {
      "get": {
        "summary": "Retrieve author profile by slug",
        "description": "Returns specific author credentials, biographical details, social links, and published articles.",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Author slug identifier" }
        ],
        "responses": {
          "200": { "description": "Author profile and publications" },
          "404": { "description": "Author not found" }
        }
      }
    },
    "/api/blog/articles/{slug}/view": {
      "post": {
        "summary": "Record article view event",
        "description": "Atomically records an article readership view count.",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "View recorded successfully" }
        }
      }
    },
    "/api/blog/articles/{slug}/feedback": {
      "get": {
        "summary": "Get article feedback statistics",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Feedback stats containing like/dislike counts" }
        }
      },
      "post": {
        "summary": "Submit article feedback",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["vote", "voterKeyHash"],
                "properties": {
                  "vote": { "type": "string", "enum": ["LIKE", "DISLIKE"] },
                  "voterKeyHash": { "type": "string", "description": "SHA-256 hash of anonymous client voter key" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Vote recorded" }
        }
      }
    },
    "/api/blog/subscribe": {
      "post": {
        "summary": "Subscribe to newsletter",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email"],
                "properties": {
                  "email": { "type": "string", "format": "email" },
                  "source": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Subscribed successfully" }
        }
      }
    },
    "/api/contact": {
      "post": {
        "summary": "Submit institutional inquiry",
        "description": "Submits institutional contact form, scheduling, or campus partnership inquiry.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["fullName", "email", "institutionName"],
                "properties": {
                  "fullName": { "type": "string" },
                  "email": { "type": "string", "format": "email" },
                  "institutionName": { "type": "string" },
                  "phone": { "type": "string" },
                  "inquiryPurpose": { "type": "string" },
                  "message": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Contact inquiry received" }
        }
      }
    }
  }
}
