{
  "openapi": "3.1.0",
  "info": {
    "title": "Mandlys public API",
    "version": "1.0.0",
    "description": "Public read-only Mandlys self-assessment catalog, articles and AI exposure methodology. No user results or account data."
  },
  "servers": [
    {
      "url": "https://mandlys.com"
    }
  ],
  "security": [],
  "paths": {
    "/api/tests.json": {
      "get": {
        "summary": "List all public tests, with bilingual text and the free/premium access model",
        "security": [],
        "responses": {
          "200": {
            "description": "Public static JSON generated from the app's content at build time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "name": {
                        "type": "object",
                        "properties": {
                          "sv": {
                            "type": "string"
                          },
                          "en": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "sv",
                          "en"
                        ]
                      },
                      "description": {
                        "type": "object",
                        "properties": {
                          "sv": {
                            "type": "string"
                          },
                          "en": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "sv",
                          "en"
                        ]
                      },
                      "languages": {
                        "type": "array",
                        "items": {
                          "enum": [
                            "sv",
                            "en"
                          ]
                        }
                      },
                      "duration": {
                        "type": "object",
                        "properties": {
                          "sv": {
                            "type": "string"
                          },
                          "en": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "sv",
                          "en"
                        ]
                      },
                      "access": {
                        "type": "object",
                        "properties": {
                          "free": {
                            "type": "boolean"
                          },
                          "premium": {
                            "type": "boolean"
                          },
                          "model": {
                            "type": "string"
                          }
                        }
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "languageNote": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/articles.json": {
      "get": {
        "summary": "List published native blog article summaries, one entry per language",
        "security": [],
        "responses": {
          "200": {
            "description": "Public static JSON generated from the app's content at build time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "slug": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "publishedAt": {
                        "type": "string",
                        "format": "date"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "language": {
                        "enum": [
                          "sv",
                          "en"
                        ]
                      },
                      "languageNote": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/methodology.json": {
      "get": {
        "summary": "Read public methodology summaries and original-source links",
        "security": [],
        "responses": {
          "200": {
            "description": "Public static JSON generated from the app's content at build time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "summary": {
                        "type": "string"
                      },
                      "language": {
                        "enum": [
                          "sv",
                          "en"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "updatedAt": {
                        "type": "string",
                        "format": "date"
                      },
                      "sources": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string",
                              "format": "uri"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/status.json": {
      "get": {
        "summary": "Check that the static API artifact is being served, not backend health",
        "security": [],
        "responses": {
          "200": {
            "description": "Public static JSON generated from the app's content at build time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "ok"
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/functions/v1/mcp": {
      "servers": [
        {
          "url": "https://xkyraeyuxklkmuywtfkg.supabase.co"
        }
      ],
      "post": {
        "summary": "Public MCP Streamable HTTP JSON-RPC transport",
        "description": "initialize, notifications/initialized, tools/list, tools/call and ping. Accept application/json and text/event-stream. SDK transport; no OAuth. Tool calls have a best-effort 120/minute global per-isolate budget, not a distributed quota.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "number"
                    ]
                  },
                  "method": {
                    "enum": [
                      "initialize",
                      "notifications/initialized",
                      "tools/list",
                      "tools/call",
                      "ping"
                    ]
                  },
                  "params": {
                    "type": "object"
                  }
                },
                "required": [
                  "jsonrpc",
                  "method"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or error; JSON or SSE according to SDK transport negotiation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted"
          },
          "400": {
            "description": "Invalid request"
          },
          "413": {
            "description": "Body exceeds 16 KiB"
          }
        }
      },
      "get": {
        "summary": "No persistent event stream required",
        "responses": {
          "405": {
            "description": "GET not supported by the stateless transport"
          }
        }
      }
    }
  }
}
