{"components":{"schemas":{"Error":{"properties":{"error":{"type":"string"}},"type":"object"},"Issue":{"properties":{"code":{"description":"Stable identifier; see /api/v1/codes","enum":["SITE_DOWN","SSL_BLOCKED","HIDDEN_SPAM_LINKS","SPAM_CONTENT","SITE_ERROR_PAGE","SITE_PARKED_OR_SUSPENDED","SSL_EXPIRING_SOON","INSECURE_FORM","NOT_MOBILE_FRIENDLY","OUTDATED_WORDPRESS","BLOCKS_SEARCH_ENGINES","DOMAIN_EXPIRING","SSL_CHAIN_INCOMPLETE","SSL_ONE_ADDRESS_BROKEN","INSECURE_FILES","NO_HTTPS_REDIRECT","REDIRECTS_ELSEWHERE","NO_EMAIL_SETUP","MAINTAINER_GONE","WWW_ADDRESS_ISSUE","MISSING_VIEWPORT","HORIZONTAL_SCROLL","SMALL_TEXT","SMALL_TAP_TARGETS","SEPARATE_MOBILE_SITE","ZOOM_DISABLED","MISSING_META_DESCRIPTION","WEAK_PAGE_TITLE","STALE_FOOTER_YEAR","NO_TAP_TO_CALL","NO_COMPRESSION","SLOW_SERVER","HEAVY_HOMEPAGE","MANY_FILES","HEADING_ISSUE","MISSING_ALT_TEXT","NO_BUSINESS_SCHEMA","HSTS_OFF","NO_SOCIAL_PREVIEW","NO_FAVICON","HTTP_NOT_ANSWERING","CHECK_BLOCKED","CONTENT_NOT_CHECKED"],"type":"string"},"evidence":{"description":"The exact observations behind the finding (hosts, errors, dates); may be empty","items":{"type":"string"},"type":"array"},"finding":{"description":"What was found, in plain English (safe to show to a person)","type":"string"},"fix":{"description":"How it's usually fixed, when there's one sentence for it","type":["string","null"]},"label":{"description":"Which check, e.g. \"Security certificate\"","type":"string"},"severity":{"enum":["critical","high","medium","low","info"],"type":"string"}},"required":["code","severity","label","finding"],"type":"object"},"Result":{"properties":{"cached":{"description":"Single check only: true when served from a check-up under 24 h old","type":"boolean"},"checked_at":{"description":"When the check-up ran (UTC)","format":"date-time","type":"string"},"counts":{"properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"info":{"type":"integer"},"low":{"type":"integer"},"medium":{"type":"integer"}},"type":"object"},"domain":{"type":"string"},"issue_count":{"type":"integer"},"issues":{"description":"Most severe first","items":{"$ref":"#/components/schemas/Issue"},"type":"array"},"mobile":{"description":"Phone measurements from a 390px-wide render (null on older check-ups)","properties":{"built_for_phones":{"description":"Has a phone layout (viewport width=device-width, or renders at phone width)","type":"boolean"},"has_viewport":{"type":"boolean"},"horizontal_scroll":{"type":"boolean"},"layout_width":{"description":"Width the page lays out at (390 = fits; ~980 = shrunken desktop page)","type":["integer","null"]},"measured":{"description":"false when the phone render wasn't available; the measurements below are then null","type":"boolean"},"page_width":{"description":"Full page width; wider than layout_width means sideways scrolling","type":["integer","null"]},"phone_tappable":{"description":"A tel: link or phone number is on the page","type":["boolean","null"]},"separate_mobile_site":{"type":"boolean"},"small_tap_targets":{"description":"Links/buttons under 24x24px","type":["integer","null"]},"small_text":{"type":"boolean"},"small_text_share":{"description":"Share of visible text under 12px (0-1)","type":["number","null"]},"tap_targets":{"type":["integer","null"]},"viewport":{"description":"The viewport tag's content","type":["string","null"]},"zoom_disabled":{"type":"boolean"}},"type":["object","null"]},"overall_status":{"description":"critical = any critical issue; needs_attention = any high/medium; healthy = low/info only","enum":["critical","needs_attention","healthy","not_checkable"],"type":"string"},"platform":{"description":"Detected website builder/CMS, e.g. WordPress, Wix","type":["string","null"]},"report_url":{"description":"Public, human-readable report with screenshots","type":"string"},"summary":{"description":"The top finding when it's medium or worse, else null","type":["string","null"]}},"required":["domain","overall_status","issues"],"type":"object"}},"securitySchemes":{"bearer":{"description":"Your key: sd_...","scheme":"bearer","type":"http"}}},"info":{"description":"Structured website check-ups for partner tools. Every claim comes from a live check with its evidence. Keys are issued per partner; ask Site Decay for one.","title":"Site Decay API","version":"1.0"},"openapi":"3.1.0","paths":{"/api/v1/access-request":{"post":{"description":"A person reviews every request. If approved, a one-time link to the key is emailed to the address given; claim it with POST and Accept: application/json.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"},"expected_volume":{"description":"e.g. 200 domains a month","type":"string"},"is_agent":{"description":"true if an automated agent is sending this","type":"boolean"},"name":{"type":"string"},"organization":{"type":"string"},"use_case":{"description":"What you'd use it for","minLength":20,"type":"string"},"website":{"type":"string"},"would_pay":{"description":"Would you pay for higher volume? yes / maybe / no","type":"string"}},"required":["name","email","use_case"],"type":"object"}}},"required":true},"responses":{"202":{"description":"{status: received, request_id, next}"},"400":{"description":"Missing name, email or use_case"},"429":{"description":"Too many requests from this address today"}},"security":[],"summary":"Request an API key (no key needed)"}},"/api/v1/batch/{batch_id}":{"get":{"description":"Poll every 30-60 s. Domains are checked one at a time (about 4 a minute).","parameters":[{"in":"path","name":"batch_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"batch_id":{"type":"string"},"complete":{"type":"boolean"},"done":{"type":"integer"},"failed":{"items":{"properties":{"domain":{"type":"string"},"error":{"type":"string"}},"type":"object"},"type":"array"},"pending":{"items":{"type":"string"},"type":"array"},"results":{"items":{"$ref":"#/components/schemas/Result"},"type":"array"},"total":{"type":"integer"}},"type":"object"}}},"description":"Progress"},"404":{"description":"No such batch for this key"}},"summary":"Batch progress and results"}},"/api/v1/check":{"get":{"description":"Returns the latest result if a check-up ran in the last 24 hours (cached: true); otherwise runs one now (about 15 seconds) and counts it against the daily limit.","parameters":[{"example":"example.com","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"1 = force a new check-up","in":"query","name":"fresh","schema":{"enum":["1"],"type":"string"}},{"description":"0 = queue it and return 202 with a batch_id instead of waiting","in":"query","name":"wait","schema":{"enum":["0"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}},"description":"Result"},"202":{"description":"Queued (wait=0): {domain, status: queued, batch_id}"},"400":{"description":"Not a valid domain"},"401":{"description":"Missing or unknown key"},"429":{"description":"Daily limit of new check-ups reached"}},"summary":"Check one domain"}},"/api/v1/check/batch":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"domains":{"items":{"type":"string"},"maxItems":100,"type":"array"},"fresh":{"default":false,"description":"true = re-check even if a result is under 24 h old","type":"boolean"}},"required":["domains"],"type":"object"}}},"required":true},"responses":{"202":{"description":"{batch_id, status_url, domains, already_fresh[], queued, invalid[], estimated_minutes}"},"400":{"description":"Bad body or more than 100 domains"},"401":{"description":"Missing or unknown key"},"429":{"description":"The batch needs more new check-ups than are left today"}},"summary":"Queue up to 100 domains"}}},"security":[{"bearer":[]}],"servers":[{"url":"https://sitedecay.com"}]}
