{
  "openapi": "3.0.3",
  "info": {
    "title": "AHKUNA draft submission",
    "version": "1.0.0",
    "description": "Submit drafts for seller review. No publication, messaging, payment or private-data access."
  },
  "servers": [
    {
      "url": "https://ahkuna-platform-git-issue-7-build-009-payments-checkout-ahkuna.vercel.app"
    }
  ],
  "paths": {
    "/api/assistant": {
      "post": {
        "operationId": "submitSellerDraft",
        "summary": "Submit a draft for seller review",
        "security": [
          {
            "connectionKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "kind",
                  "text"
                ],
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "submit_draft"
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "listing",
                      "reply"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Required for a listing."
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Maximum 400 characters for listings, 2000 for replies."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pending draft created. Nothing published or sent."
          },
          "403": {
            "description": "Connection unavailable, missing permission or at daily limit."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "connectionKey": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
