{
  "openapi": "3.0.3",
  "info": {
    "title": "Starko Website API",
    "description": "Public HTTP endpoints exposed by the starko.one marketing site: machine-readable (Markdown) content for AI crawlers/agents, and the contact form. This does not cover the Starko product APIs used inside the app (chat.starko.one) — those are documented separately for authenticated customers.",
    "version": "1.0.0",
    "contact": {
      "name": "Starko",
      "url": "https://www.starko.one/contact",
      "email": "info@starko.one"
    }
  },
  "servers": [
    {
      "url": "https://www.starko.one",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Starko developer portal (quickstart, agent resources)",
    "url": "https://www.starko.one/developers"
  },
  "paths": {
    "/api/md": {
      "get": {
        "operationId": "getHomepageMarkdown",
        "summary": "Homepage content as Markdown",
        "description": "Returns the homepage content as plain Markdown for agents and crawlers. Equivalent to requesting `GET /` with an `Accept: text/markdown` header.",
        "tags": ["Content"],
        "responses": {
          "200": {
            "description": "Homepage content",
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          }
        }
      }
    },
    "/api/blog-md/{slug}": {
      "get": {
        "operationId": "getBlogPostMarkdown",
        "summary": "Blog post content as Markdown",
        "description": "Returns the raw Markdown body of a blog post, with a small metadata header (canonical URL, published date, author). Equivalent to requesting `/blog/{slug}.md` or `GET /blog/{slug}` with an `Accept: text/markdown` header.",
        "tags": ["Content"],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Blog post slug, lowercase letters, digits and hyphens only.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blog post content",
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              }
            }
          },
          "404": {
            "description": "No blog post exists for the given slug.",
            "content": {
              "text/plain": {
                "schema": { "type": "string", "example": "Not found" }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "operationId": "submitContactForm",
        "summary": "Submit the contact form",
        "description": "Sends a message from a visitor to the Starko team.",
        "tags": ["Contact"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["email", "message"],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Reply-to email address of the sender."
                  },
                  "message": {
                    "type": "string",
                    "description": "Message body."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message sent successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean", "example": true },
                    "data": { "type": "object" }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid email/message.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" }
                  }
                }
              }
            }
          },
          "500": {
            "description": "The message could not be sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
