{"openapi":"3.1.0","info":{"title":"AWcode public API","description":"Read-only catalogue + contact intake for awcode.com. The OS shell at the root URL consumes these endpoints; agents are welcome to do the same.","version":"1.0.0","contact":{"email":"info@awcode.com","url":"https:\/\/awcode.com"}},"servers":[{"url":"https:\/\/awcode.com"}],"paths":{"\/api\/posts":{"get":{"summary":"List published news posts (most recent first).","operationId":"listPosts","responses":{"200":{"description":"JSON array of posts.","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/PostSummary"}}}}}}}},"\/api\/posts\/{slug}":{"get":{"summary":"Fetch a single post by slug.","operationId":"getPost","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Post","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Post"}}}},"404":{"description":"Not found"}}}},"\/api\/pages\/{key}":{"get":{"summary":"Fetch a CMS-managed page by key.","operationId":"getPage","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9_-]+$"}}],"responses":{"200":{"description":"Page","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Page"}}}},"404":{"description":"Not found"}}}},"\/api\/contact":{"post":{"summary":"Submit a contact form message.","operationId":"submitContact","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ContactRequest"}}}},"responses":{"200":{"description":"{\"ok\":true}"},"422":{"description":"Validation or captcha failure"},"429":{"description":"Rate limit exceeded"}}}}},"components":{"schemas":{"PostSummary":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string"},"tag":{"type":"string","nullable":true},"author":{"type":"string","nullable":true},"date":{"type":"string","format":"date"}}},"Post":{"allOf":[{"$ref":"#\/components\/schemas\/PostSummary"},{"type":"object","properties":{"body":{"type":"string","description":"HTML."}}}]},"Page":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"eyebrow":{"type":"string","nullable":true},"lead":{"type":"string","nullable":true},"body":{"type":"string","description":"HTML."}}},"ContactRequest":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string","maxLength":120},"email":{"type":"string","format":"email","maxLength":160},"company":{"type":"string","nullable":true,"maxLength":160},"topic":{"type":"string","nullable":true,"maxLength":120},"message":{"type":"string","maxLength":5000},"turnstile_token":{"type":"string","nullable":true,"maxLength":4096}}}}}}