{
  "openapi": "3.1.0",
  "info": {
    "title": "WebUpCheck API",
    "version": "1.1.0"
  },
  "paths": {
    "/api/check": {
      "get": {
        "operationId": "checkWebsite",
        "summary": "Check a public website from one server",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check result; failure to reach target is a result, not an API error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "reachable",
                        "blocked",
                        "error",
                        "unreachable",
                        "inconclusive"
                      ]
                    },
                    "httpStatus": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "durationMs": {
                      "type": "integer"
                    },
                    "url": {
                      "type": "string"
                    },
                    "finalUrl": {
                      "type": "string"
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "perspective": {
                      "type": "string"
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "evidence": {
                      "type": "object",
                      "description": "DNS answers, redirects, HTTPS connection state and probe location; not a certificate scan."
                    },
                    "attempts": {
                      "type": "array",
                      "maxItems": 2,
                      "items": {
                        "type": "object"
                      }
                    },
                    "verification": {
                      "type": "string",
                      "enum": [
                        "single_observation",
                        "repeated_observation",
                        "changed_on_retry"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or restricted target"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Check protection unavailable; retry later"
          }
        },
        "description": "No registration or API key. Shared API/MCP cache up to 30 seconds; selected failures retried within eight seconds. Per-IP and global check budgets apply; honor Retry-After."
      }
    }
  },
  "servers": [
    {
      "url": "https://webupcheck.com"
    }
  ],
  "security": []
}
