{"openapi":"3.1.0","info":{"title":"AgentReady API","version":"1.0.0","description":"Audit how ready a website is for AI agents."},"servers":[{"url":"https://agent-ready.baudypositive.com"}],"paths":{"/api/audit":{"post":{"operationId":"createAudit","summary":"Create an audit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued"]},"ownerToken":{"type":"string"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit/{id}":{"get":{"operationId":"getAudit","summary":"Get an audit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}}],"responses":{"200":{"description":"The audit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audit"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteAudit","summary":"Delete an audit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}},{"name":"x-owner-token","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit/{id}/events":{"get":{"operationId":"auditEvents","summary":"Progress stream (server-sent events)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}}],"responses":{"200":{"description":"text/event-stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit/{id}/recheck":{"post":{"operationId":"recheckAudit","summary":"Re-run selected checks and create a new revision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}},{"name":"x-owner-token","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["checkIds"],"properties":{"checkIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"The new revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audit"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit/{id}/export":{"get":{"operationId":"exportAudit","summary":"Export a report","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}},{"name":"format","in":"query","schema":{"type":"string","enum":["json","md","pdf"]}}],"responses":{"200":{"description":"The report"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit/{id}/prompt":{"get":{"operationId":"fixPrompt","summary":"Fix prompt for a coding agent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"aud_7a9c1e"}},{"name":"priority","in":"query","schema":{"type":"string","enum":["all","P0"]}}],"responses":{"200":{"description":"Plain text","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Audit":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","complete","failed"]},"url":{"type":"string"},"overallScore":{"type":"integer","minimum":0,"maximum":100},"grade":{"type":"string","enum":["Highly Agent-Ready","Partially Compatible","Agent Impaired"]},"confidence":{"type":"string","enum":["high","medium","low"]},"rulesetVersion":{"type":"string"},"siteType":{"type":"string"},"platform":{"type":"string"},"categories":{"type":"object","additionalProperties":true},"remediations":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}