{
  "openapi": "3.1.0",
  "info": {
    "title": "Blessed OS API",
    "version": "1.0.0",
    "description": "Public API reference seed for Blessed OS beta."
  },
  "servers": [
    {
      "url": "/api/v1",
      "description": "Current deployment"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/auth/login": {
      "post": {
        "summary": "Create user session",
        "tags": ["Auth"],
        "responses": {
          "200": {
            "description": "Authenticated session with access token and user context."
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "summary": "List contacts",
        "tags": ["Contacts"],
        "responses": {
          "200": {
            "description": "Tenant-scoped contact collection."
          }
        }
      },
      "post": {
        "summary": "Create contact",
        "tags": ["Contacts"],
        "responses": {
          "201": {
            "description": "Created contact."
          }
        }
      }
    },
    "/sales/deals": {
      "post": {
        "summary": "Create deal",
        "tags": ["Sales"],
        "responses": {
          "201": {
            "description": "Created deal and emitted outbox event."
          }
        }
      }
    },
    "/telegram/send": {
      "post": {
        "summary": "Send Telegram message",
        "tags": ["Telegram"],
        "responses": {
          "201": {
            "description": "Outbound message reference."
          }
        }
      }
    },
    "/automation/workflows": {
      "get": {
        "summary": "List workflows",
        "tags": ["Blessed Flow"],
        "responses": {
          "200": {
            "description": "Saved workflow definitions."
          }
        }
      },
      "post": {
        "summary": "Create workflow",
        "tags": ["Blessed Flow"],
        "responses": {
          "201": {
            "description": "Created workflow."
          }
        }
      }
    },
    "/analytics/dashboards": {
      "get": {
        "summary": "List dashboards",
        "tags": ["Analytics"],
        "responses": {
          "200": {
            "description": "Saved dashboards."
          }
        }
      }
    },
    "/marketing/forms/{id}/submit": {
      "post": {
        "summary": "Submit public form",
        "tags": ["Marketing"],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Accepted form submission and emitted form.submitted."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
