{
  "openapi": "3.1.0",
  "info": {
    "title": "MODEX websitecheck",
    "version": "1.0.0",
    "description": "Gratis websitecheck van MODEX: haalt de homepage van een domein op en beoordeelt negen zichtbare punten. Het ingevulde domein en de uitslag worden bewaard, zonder naam of IP-adres; een uitslag staat een uur in de cache. De API is bedoeld voor de pagina /websitecheck/ en antwoordt alleen op aanroepen vanaf modexsoftware.nl zelf (anders 403). In een browser is dezelfde check beschikbaar als WebMCP-tool modex_websitecheck.",
    "contact": {
      "name": "MODEX",
      "email": "info@modexsoftware.nl",
      "url": "https://modexsoftware.nl/contact/"
    }
  },
  "servers": [
    {
      "url": "https://modexsoftware.nl"
    }
  ],
  "paths": {
    "/api/websitecheck": {
      "get": {
        "operationId": "websitecheck",
        "summary": "Beoordeel de homepage van een domein",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Domeinnaam, bijvoorbeeld www.jouwbedrijf.nl",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "De uitslag van de check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "host",
                    "finalUrl",
                    "ms",
                    "kb",
                    "score",
                    "checks"
                  ],
                  "properties": {
                    "host": {
                      "type": "string"
                    },
                    "finalUrl": {
                      "type": "string"
                    },
                    "ms": {
                      "type": "number",
                      "description": "Reactietijd van de homepage in milliseconden"
                    },
                    "kb": {
                      "type": "number",
                      "description": "Grootte van de homepage in kB"
                    },
                    "score": {
                      "type": "integer",
                      "description": "Aantal punten dat in orde is"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "label",
                          "ok",
                          "detail"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "ok": {
                            "type": "boolean"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Geen geldige domeinnaam",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Aanroep van buiten modexsoftware.nl",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Te veel checks in een minuut",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Het domein was niet bereikbaar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}