{
  "openapi": "3.1.0",
  "info": {
    "title": "Neurobird Public API",
    "version": "1.0.0",
    "description": "Public endpoints on neurobird.com. Two things are callable without a key: a niche-scoped product assistant, and an early-access lead endpoint. Everything else on the host is private.",
    "contact": { "name": "Neurobird", "email": "office@neurobird.com", "url": "https://neurobird.com/" },
    "license": { "name": "Proprietary", "url": "https://neurobird.com/legal/" }
  },
  "servers": [ { "url": "https://neurobird.com", "description": "Production" } ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Service health",
        "operationId": "health",
        "responses": { "200": { "description": "Service is up", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/api/chat": {
      "post": {
        "summary": "Ask the assistant for one Neurobird product",
        "description": "Each Neurobird vertical product page carries an assistant scoped to that single niche. It answers questions about that niche and the software being built for it, and declines everything else. Pass the product slug (for example waterloss, coldchain, priorauth) to select the scope.",
        "operationId": "chat",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": {
            "type": "object",
            "required": ["message"],
            "properties": {
              "message": { "type": "string", "description": "The user question." },
              "slug": { "type": "string", "description": "Product slug, for example waterloss. Selects which niche the assistant is scoped to." },
              "history": { "type": "array", "description": "Prior turns, oldest first.", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": ["user", "assistant"] }, "content": { "type": "string" } } } }
            }
          } } }
        },
        "responses": {
          "200": { "description": "Assistant reply", "content": { "application/json": { "schema": { "type": "object", "properties": { "reply": { "type": "string" } } } } } },
          "429": { "description": "Rate limited" }
        }
      }
    },
    "/api/lead": {
      "post": {
        "summary": "Request early access to a product",
        "description": "Submits an early-access request. Protected by Cloudflare Turnstile and a honeypot field, so it is intended for use from the product pages by a person, not for automated submission.",
        "operationId": "lead",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": {
            "type": "object",
            "required": ["name", "email"],
            "properties": {
              "name": { "type": "string" },
              "email": { "type": "string", "format": "email" },
              "company": { "type": "string" },
              "message": { "type": "string" },
              "slug": { "type": "string", "description": "Which product the request is about." },
              "cf-turnstile-response": { "type": "string", "description": "Turnstile token. Required." }
            }
          } } }
        },
        "responses": {
          "200": { "description": "Recorded" },
          "400": { "description": "Turnstile verification failed or required fields missing" }
        }
      }
    }
  }
}
