{
 "openapi": "3.1.0",
 "info": {
  "title": "Xaminat API",
  "version": "1.0.0",
  "description": "Automated checks that detect potential accessibility, privacy, consumer law, security, SEO and speed issues on public websites, judged by type of business. Results describe potential issues; they are not legal advice or a certification of compliance. The same engine is available to AI assistants as an MCP server at https://xaminat.com/mcp.",
  "contact": {
   "name": "Xaminat support",
   "email": "hello@xaminat.com",
   "url": "https://xaminat.com/docs"
  },
  "termsOfService": "https://xaminat.com/terms"
 },
 "servers": [
  {
   "url": "https://xaminat.com"
  }
 ],
 "externalDocs": {
  "description": "Developer guide",
  "url": "https://xaminat.com/docs"
 },
 "components": {
  "securitySchemes": {
   "licenceKey": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your Xaminat licence key. Optional: without it you get the free check."
   }
  },
  "schemas": {
   "Inspection": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "url": {
      "type": "string"
     },
     "status": {
      "type": "string",
      "enum": [
       "queued",
       "running",
       "done",
       "failed",
       "cancelled",
       "blocked"
      ]
     },
     "kind": {
      "type": "string",
      "enum": [
       "free",
       "review",
       "full"
      ],
      "description": "free: no key; review: paid, unverified site; full: paid, verified site (includes security checks)"
     },
     "verified": {
      "type": "boolean"
     },
     "plan": {
      "type": "string"
     },
     "reportUrl": {
      "type": "string",
      "description": "Private link to the visual report"
     },
     "launchStatus": {
      "type": "string",
      "description": "\"Not launch ready\", \"No blockers found · fixes to schedule\" or \"No issues found in these automated checks\". There is no score, and no status is a guarantee of legal compliance."
     },
     "businessType": {
      "type": "string"
     },
     "pagesChecked": {
      "type": "integer"
     },
     "inspectedAt": {
      "type": "string",
      "format": "date-time"
     },
     "counts": {
      "type": "object",
      "properties": {
       "blockers": {
        "type": "integer"
       },
       "medium": {
        "type": "integer"
       },
       "low": {
        "type": "integer"
       }
      }
     },
     "findings": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string",
         "description": "Checklist item, e.g. \"6.1\""
        },
        "severity": {
         "type": "string",
         "enum": [
          "Critical",
          "High",
          "Medium",
          "Low"
         ]
        },
        "area": {
         "type": "string"
        },
        "problem": {
         "type": "string",
         "description": "The potential issue detected"
        },
        "where": {
         "type": "string",
         "description": "Page(s) and screen size"
        },
        "why": {
         "type": "string",
         "description": "Why it matters: the rule or standard (blockers on free checks; all findings on paid inspections)"
        },
        "fix": {
         "type": "string",
         "description": "Suggested fix"
        }
       }
      }
     },
     "progress": {
      "type": "object",
      "description": "While running: stage, pct, findings so far"
     },
     "error": {
      "type": "string"
     },
     "disclaimer": {
      "type": "string"
     }
    }
   },
   "Finding": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "description": "Checklist item, e.g. \"6.1\""
     },
     "severity": {
      "type": "string",
      "enum": [
       "Critical",
       "High",
       "Medium",
       "Low"
      ]
     },
     "area": {
      "type": "string"
     },
     "problem": {
      "type": "string",
      "description": "The potential issue detected"
     },
     "where": {
      "type": "string",
      "description": "Page(s) and screen size"
     },
     "why": {
      "type": "string",
      "description": "Why it matters: the rule or standard (blockers on free checks; all findings on paid inspections)"
     },
     "fix": {
      "type": "string",
      "description": "Suggested fix"
     }
    }
   }
  }
 },
 "security": [
  {},
  {
   "licenceKey": []
  }
 ],
 "paths": {
  "/v1/inspections": {
   "post": {
    "operationId": "startInspection",
    "summary": "Start an inspection",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "example": "https://example.com"
         },
         "business_type": {
          "type": "string",
          "description": "Optional, e.g. \"personal-services\" or \"creative+retail\". Detected if left out."
         },
         "max_pages": {
          "type": "integer",
          "minimum": 1,
          "maximum": 25,
          "description": "Free: up to 5. Paid: up to 25."
         },
         "webhook_url": {
          "type": "string",
          "description": "Optional (licence key needed). Public https address we POST the finished inspection to, signed with the returned webhook secret."
         }
        }
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Accepted",
      "headers": {
       "x-ratelimit-limit": {
        "schema": {
         "type": "integer"
        },
        "description": "Free checks allowed per day (free checks only)"
       },
       "x-ratelimit-remaining": {
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "allOf": [
          {
           "$ref": "#/components/schemas/Inspection"
          },
          {
           "type": "object",
           "properties": {
            "webhook": {
             "type": "object",
             "properties": {
              "url": {
               "type": "string"
              },
              "secret": {
               "type": "string",
               "description": "Shown once. Verify X-Xaminat-Signature with it."
              }
             }
            }
           }
          }
         ]
        }
       }
      }
     },
     "400": {
      "description": "Bad input",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "Needs a licence key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "403": {
      "description": "Plan limit or site not verified",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Free daily limit reached",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      },
      "headers": {
       "x-ratelimit-limit": {
        "schema": {
         "type": "integer"
        },
        "description": "Free checks allowed per day (free checks only)"
       },
       "x-ratelimit-remaining": {
        "schema": {
         "type": "integer"
        }
       },
       "retry-after": {
        "schema": {
         "type": "integer"
        }
       }
      }
     },
     "503": {
      "description": "Busy, try again shortly",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "callbacks": {
     "inspectionFinished": {
      "{$request.body#/webhook_url}": {
       "post": {
        "summary": "Sent when the inspection finishes (completed, failed or blocked)",
        "parameters": [
         {
          "name": "X-Xaminat-Signature",
          "in": "header",
          "required": true,
          "schema": {
           "type": "string"
          },
          "description": "t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" using your webhook secret>"
         },
         {
          "name": "X-Xaminat-Event",
          "in": "header",
          "schema": {
           "type": "string",
           "enum": [
            "inspection.done",
            "inspection.failed",
            "inspection.blocked"
           ]
          }
         }
        ],
        "requestBody": {
         "content": {
          "application/json": {
           "schema": {
            "type": "object",
            "properties": {
             "event": {
              "type": "string"
             },
             "sentAt": {
              "type": "string"
             },
             "inspection": {
              "$ref": "#/components/schemas/Inspection"
             }
            }
           }
          }
         }
        },
        "responses": {
         "200": {
          "description": "Return any 2xx to acknowledge. Other answers are retried twice (after 2 and 8 seconds)."
         }
        }
       }
      }
     }
    }
   }
  },
  "/v1/inspections/{id}": {
   "get": {
    "operationId": "getInspection",
    "summary": "Status and results of an inspection",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "t",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "The token from reportUrl"
     },
     {
      "name": "wait",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "allowEmptyValue": true,
      "description": "Wait up to 25 seconds for the inspection to finish"
     }
    ],
    "responses": {
     "200": {
      "description": "The inspection",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Inspection"
        }
       }
      }
     },
     "404": {
      "description": "Unknown inspection or token",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/v1/sites/verify": {
   "post": {
    "operationId": "startVerification",
    "summary": "Get a code to prove you own a site (licence key needed)",
    "security": [
     {
      "licenceKey": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "site"
        ],
        "properties": {
         "site": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Code and three ways to publish it"
     },
     "402": {
      "description": "Needs a licence key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/v1/sites/verify/check": {
   "post": {
    "operationId": "checkVerification",
    "summary": "Check that the code is published",
    "security": [
     {
      "licenceKey": []
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "site"
        ],
        "properties": {
         "site": {
          "type": "string"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Whether the site is verified"
     }
    }
   }
  },
  "/v1/entitlements": {
   "get": {
    "operationId": "getEntitlements",
    "summary": "What your licence key unlocks",
    "responses": {
     "200": {
      "description": "Plan and features"
     }
    }
   }
  },
  "/v1/plans": {
   "get": {
    "operationId": "getPlans",
    "summary": "The plans",
    "security": [
     {}
    ],
    "responses": {
     "200": {
      "description": "Plans"
     }
    }
   }
  },
  "/status.json": {
   "get": {
    "operationId": "getStatus",
    "summary": "Service status",
    "security": [
     {}
    ],
    "responses": {
     "200": {
      "description": "API and engine status, last-24-hour success rate and median time"
     }
    }
   }
  }
 }
}