{"openapi":"3.1.0","info":{"title":"hreflang.com API","version":"1.0.0","description":"Validate hreflang clusters: return links, codes, x-default, canonicals, redirects, sitemaps and JS rendering."},"servers":[{"url":"https://hreflang.com/api/v1"}],"paths":{"/check":{"post":{"summary":"Check one URL and its cluster (<= 25 URLs), waiting up to 90 s","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"html":{"type":"string"},"headers":{"type":"string"}}}}}},"responses":{"200":{"description":"Finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"Still running; poll status_url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"post":{"summary":"Start an asynchronous check","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"sitemap":{"type":"string"},"domain":{"type":"string"},"email":{"type":"string","format":"email"},"max_urls":{"type":"integer","minimum":1}}}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}":{"get":{"summary":"Job status and progress","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"description":"Unknown job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/{hash}":{"get":{"summary":"Full report JSON","parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Report","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/codes/{code}":{"get":{"summary":"Validate one hreflang value","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Code"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}},"Job":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"enum":["queued","running","done","aborted"]},"urls_done":{"type":"integer"},"urls_total":{"type":"integer"},"status_url":{"type":"string"},"report_url":{"type":["string","null"]},"report_json_url":{"type":["string","null"]}}},"Code":{"type":"object","properties":{"code":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"]},"error":{"type":["string","null"]},"fix":{"type":["string","null"]},"message":{"type":"string"}}}}}}