{"openapi":"3.1.0","info":{"title":"SecondDoor API","version":"0.1.0","description":"Scan a website and score how well humans and AI agents each get through its funnel. Reading reports needs no authentication. Basic scans (depth value `free`) are rate limited to 8 per hour per address. Deep scans run on the paid plans and need a signed-in account."},"servers":[{"url":"https://www.seconddoor.io"}],"paths":{"/api/scans":{"post":{"summary":"Start a scan","operationId":"createScan","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The site to scan."},"depth":{"type":"string","enum":["free","deep"],"default":"free","description":"free runs the basic scan: deterministic checks plus one browser walk. deep adds two agent walks and needs a paid account. The stored value stays free; the product calls this depth a basic scan."},"force":{"type":"boolean","description":"Rescan even if a recent report exists."}}}}}},"responses":{"200":{"description":"A recent report already exists, or a scan is already running.","content":{"application/json":{"schema":{"type":"object","properties":{"scanId":{"type":"string"},"existingReportSlug":{"type":"string"}}}}}},"201":{"description":"Scan queued.","content":{"application/json":{"schema":{"type":"object","properties":{"scanId":{"type":"string"}}}}}},"422":{"description":"The address could not be scanned."},"429":{"description":"Rate limited."}}}},"/api/scans/{id}":{"get":{"summary":"Scan status and progress","operationId":"getScan","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status, events so far, and the report slug once ready."}}}},"/api/reports/{slug}":{"get":{"summary":"Read a report","operationId":"getReport","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The report. Evidence and fixes are redacted unless the caller holds an access cookie.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"description":"No such report."}}}},"/r/{slug}.md":{"get":{"summary":"Read a report as markdown","operationId":"getReportMarkdown","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The report as markdown.","content":{"text/markdown":{}}}}}},"/api/status":{"get":{"summary":"Service status","operationId":"getStatus","responses":{"200":{"description":"All services reachable."},"503":{"description":"Degraded."}}}}},"components":{"schemas":{"Report":{"type":"object","properties":{"slug":{"type":"string"},"companyName":{"type":"string"},"domain":{"type":"string"},"headline":{"type":"string"},"depth":{"type":"string","enum":["free","deep"]},"compositeScore":{"type":"integer","minimum":0,"maximum":100},"humanScore":{"type":"integer","minimum":0,"maximum":100},"agentScore":{"type":"integer","minimum":0,"maximum":100},"doorGap":{"type":"integer"},"percentile":{"type":["integer","null"]},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"audience":{"type":"string","enum":["human","agent"]},"score":{"type":"integer"},"summary":{"type":"string"}}}},"issues":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"title":{"type":"string"},"dimensionKey":{"type":"string"}}}}}}}}}