{
  "openapi": "3.1.0",
  "info": {
    "title": "FlowSimp",
    "version": "1.0.0",
    "description": "Create a free FlowSimp flowchart link from Mermaid or an indented outline. No API key."
  },
  "servers": [{ "url": "https://flowsimp.com" }],
  "paths": {
    "/api/flowchart": {
      "post": {
        "operationId": "createFlowchart",
        "summary": "Create a flowchart link",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["text"],
                "properties": {
                  "text": { "type": "string", "description": "Mermaid flowchart or an indented outline." },
                  "title": { "type": "string" },
                  "mode": { "type": "string", "enum": ["flowchart", "network"] }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Links to the diagram",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shareUrl": { "type": "string" },
                    "editUrl": { "type": "string" },
                    "nodeCount": { "type": "integer" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
