{
  "openapi": "3.1.0",
  "info": {
    "title": "Konstantinos Botonakis Public Site API",
    "version": "1.0.0",
    "description": "Read-only endpoints for public profile metadata, blog discovery, and site status.",
    "contact": {
      "name": "Konstantinos Botonakis",
      "url": "https://konstantinos.top",
      "email": "contact[at]konstantinos[dot]top"
    }
  },
  "servers": [
    {
      "url": "https://konstantinos.top"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauthClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://konstantinos.top/oauth/token",
            "scopes": {
              "profile:read": "Read protected profile metadata.",
              "blog:read": "Read protected blog summaries.",
              "paid:read": "Access paid x402-backed briefing content."
            }
          }
        }
      },
      "x402PaymentSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "Payment-Signature",
        "description": "x402 payment payload header. Clients may also send X-Payment depending on the SDK."
      }
    }
  },
  "tags": [
    {
      "name": "Site",
      "description": "General site metadata and discovery."
    },
    {
      "name": "Blog",
      "description": "Blog listing and item lookup."
    },
    {
      "name": "Status",
      "description": "Simple health metadata."
    },
    {
      "name": "Protected",
      "description": "OAuth-protected machine-readable endpoints."
    },
    {
      "name": "Paid",
      "description": "x402-paid endpoints for agent-native payments."
    }
  ],
  "paths": {
    "/api/site.json": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "Get the public site profile",
        "responses": {
          "200": {
            "description": "Public profile, contact links, and discovery URLs."
          }
        }
      }
    },
    "/api/blog-posts.json": {
      "get": {
        "tags": [
          "Blog"
        ],
        "summary": "List published blog posts",
        "responses": {
          "200": {
            "description": "Published blog post summaries."
          }
        }
      }
    },
    "/api/blog-posts/{id}.json": {
      "get": {
        "tags": [
          "Blog"
        ],
        "summary": "Get a blog post summary by numeric id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A single blog post summary."
          },
          "404": {
            "description": "No blog post matched the supplied id."
          }
        }
      }
    },
    "/api/status.json": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Get service health metadata",
        "responses": {
          "200": {
            "description": "Current status for the public site API."
          }
        }
      }
    },
    "/api/protected/profile.json": {
      "get": {
        "tags": [
          "Protected"
        ],
        "summary": "Get protected profile metadata",
        "security": [
          {
            "oauthClientCredentials": [
              "profile:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Protected profile metadata for authorized clients."
          },
          "401": {
            "description": "A valid bearer token is required."
          },
          "403": {
            "description": "The token does not include the required scope."
          }
        }
      }
    },
    "/api/paid/briefing.json": {
      "get": {
        "tags": [
          "Paid"
        ],
        "summary": "Get a paid machine-readable briefing",
        "security": [
          {
            "x402PaymentSignature": []
          }
        ],
        "responses": {
          "200": {
            "description": "The paid briefing payload after successful x402 settlement."
          },
          "402": {
            "description": "Payment required. The response includes x402 payment requirements."
          }
        }
      }
    }
  }
}