{"openapi":"3.1.0","info":{"title":"EventMoot API","version":"1.0.0","description":"Public REST API for EventMoot — events, groups, polls, smart scheduling, and calendar integration. Bearer-token auth via API keys managed at /settings/api-keys in the main app."},"servers":[{"url":"/","description":"This site"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"em_live_<base64url> or em_test_<base64url>","description":"EventMoot API key. Create one at /settings/api-keys in the main app and pass as `Authorization: Bearer em_live_...`."}},"schemas":{},"parameters":{}},"paths":{"/v1/users/me":{"get":{"tags":["Users"],"summary":"Get current user profile","responses":{"200":{"description":"Current user profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"image":{"type":["string","null"]},"timezone":{"type":"string"},"subscriptionTier":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","email","image","timezone","subscriptionTier","createdAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"USER_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"patch":{"tags":["Users"],"summary":"Update current user profile","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"timezone":{"type":"string","maxLength":64,"description":"An IANA zone such as Europe/London. Abbreviations like EST are refused."},"image":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Updated profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":"string"},"image":{"type":["string","null"]},"timezone":{"type":"string"},"subscriptionTier":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","email","image","timezone","subscriptionTier","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/users/me/availability":{"get":{"tags":["Users"],"summary":"Get weekly availability","responses":{"200":{"description":"Current user's weekly availability","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timezone":{"type":"string"},"slots":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"]}}}},"required":["timezone","slots"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"put":{"tags":["Users"],"summary":"Update weekly availability","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string","maxLength":64,"description":"An IANA zone such as Europe/London. Abbreviations like EST are refused."},"slots":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"]}}}},"required":["slots"]}}}},"responses":{"200":{"description":"Updated weekly availability","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"timezone":{"type":"string"},"slots":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}},"required":["start","end"]}}}},"required":["timezone","slots"]}},"required":["data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events":{"get":{"tags":["Events"],"summary":"List events for the current user","parameters":[{"schema":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["organizer","invited","responded"]},"required":false,"name":"role","in":"query"},{"schema":{"type":"string"},"required":false,"name":"groupId","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"pageSize","in":"query"}],"responses":{"200":{"description":"Events list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Events"],"summary":"Create a new event","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"location":{"type":"string","maxLength":500},"timeZone":{"type":"string","maxLength":64,"default":"UTC","description":"An IANA zone such as Europe/London. Abbreviations like EST are refused."},"privacyType":{"type":"string","enum":["PUBLIC","PRIVATE","INVITATION_ONLY"],"default":"PRIVATE"},"groupSlug":{"type":"string","minLength":1},"groupId":{"type":"string"}},"required":["title"]}}}},"responses":{"201":{"description":"Created event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid event data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}":{"get":{"tags":["Events"],"summary":"Get an event by slug","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"patch":{"tags":["Events"],"summary":"Update an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"location":{"type":"string","maxLength":500},"timeZone":{"type":"string","maxLength":64,"description":"An IANA zone such as Europe/London. Abbreviations like EST are refused."}}}}}},"responses":{"200":{"description":"Updated event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"delete":{"tags":["Events"],"summary":"Cancel an event (soft delete)","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Cancelled event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/publish":{"post":{"tags":["Events"],"summary":"Publish a draft event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Published event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"EVENT_NOT_DRAFT: only draft events can be published. EVENT_NOT_READY: the event has no polls, or a poll is incomplete -- a date poll with no dates, a choice or ranking poll with fewer than two options, or a rating poll with nothing to rate; or its voting deadline has already passed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_READY","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Not the organizer, or the monthly published-event limit is reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/finalize":{"post":{"tags":["Events"],"summary":"Finalize an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Finalized event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"The event is a draft: publish it before finalizing it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_PUBLISHED","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/attendees":{"get":{"tags":["Events"],"summary":"List attendees for an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Attendees list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"status":{"type":"string"},"respondedAt":{"type":["string","null"]}},"required":["id","userId","name","email","status","respondedAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/cancel":{"post":{"tags":["Events"],"summary":"Cancel an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Cancelled event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/conflicts":{"get":{"tags":["Conflicts"],"summary":"Detect scheduling conflicts for an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Conflict detection result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"eventSlug":{"type":"string"},"checkedAt":{"type":"string"},"summary":{"type":"object","properties":{"total":{"type":"integer"},"critical":{"type":"integer"},"warning":{"type":"integer"},"info":{"type":"integer"}},"required":["total","critical","warning","info"]},"conflicts":{"type":"object","properties":{"externalCalendars":{"type":"array","items":{}},"events":{"type":"array","items":{}},"groupOverrides":{"type":"array","items":{}},"exceptions":{"type":"array","items":{}},"participationModes":{"type":"array","items":{}}},"required":["externalCalendars","events","groupOverrides","exceptions","participationModes"]}},"required":["eventSlug","checkedAt","summary","conflicts"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups":{"get":{"tags":["Groups"],"summary":"List moots for the current user","responses":{"200":{"description":"Moots list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"memberCount":{"type":"integer"},"userRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"isPublic":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["slug","name","description","memberCount","userRole","isPublic","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Groups"],"summary":"Create a new moot","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"isPublic":{"type":"boolean","default":false}},"required":["name"]}}}},"responses":{"201":{"description":"Created moot","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"memberCount":{"type":"integer"},"userRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"isPublic":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["slug","name","description","memberCount","userRole","isPublic","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid moot data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}":{"get":{"tags":["Groups"],"summary":"Get a moot by slug","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Moot","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"memberCount":{"type":"integer"},"userRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"isPublic":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["slug","name","description","memberCount","userRole","isPublic","createdAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"patch":{"tags":["Groups"],"summary":"Update a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"isPublic":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated moot","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"memberCount":{"type":"integer"},"userRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"isPublic":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["slug","name","description","memberCount","userRole","isPublic","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/members":{"get":{"tags":["Groups"],"summary":"List members of a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Moot members","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER"]},"joinedAt":{"type":"string"}},"required":["userId","name","email","role","joinedAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/events":{"get":{"tags":["Groups"],"summary":"List events for a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Moot events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"organizerName":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["slug","title","status","organizerName","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/suggested-times":{"get":{"tags":["Scheduling"],"summary":"Get AI-suggested meeting times for a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY"],"default":"WEEKLY"},"required":false,"name":"frequency","in":"query"},{"schema":{"type":"integer","minimum":15,"maximum":480,"default":60},"required":false,"name":"duration","in":"query"},{"schema":{"type":"string"},"required":false,"name":"startDate","in":"query"}],"responses":{"200":{"description":"Ranked suggested time slots","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"groupSlug":{"type":"string"},"memberCount":{"type":"integer"},"analysisDate":{"type":"string"},"frequency":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY"]},"suggestions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"dayOfWeek":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"availableMembers":{"type":"array","items":{"type":"string"}},"availabilityScore":{"type":"number"},"isIdeal":{"type":"boolean"}},"required":["date","dayOfWeek","startTime","endTime","availableMembers","availabilityScore","isIdeal"]}}},"required":["groupSlug","memberCount","analysisDate","frequency","suggestions"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/availability":{"get":{"tags":["Scheduling"],"summary":"Get aggregated availability for a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}([Tt ][\\d:.]+([Zz]|[+-]\\d{2}:?\\d{2})?)?$"},"required":true,"name":"startDate","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}([Tt ][\\d:.]+([Zz]|[+-]\\d{2}:?\\d{2})?)?$"},"required":true,"name":"endDate","in":"query"},{"schema":{"type":"string","maxLength":64,"default":"UTC"},"required":false,"name":"timezone","in":"query"}],"responses":{"200":{"description":"Per-member availability for the date range","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"groupSlug":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"participationMode":{"type":"string"},"timeSlots":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"available":{"type":"boolean"}},"required":["date","startTime","endTime","available"]}}},"required":["userId","name","participationMode","timeSlots"]}}},"required":["groupSlug","startDate","endDate","members"]}},"required":["data"]}}}},"400":{"description":"Invalid query parameters — startDate and endDate are required ISO 8601 dates at most 93 days apart, and timezone must be an IANA zone","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/polls":{"get":{"tags":["Polls"],"summary":"List polls on an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Polls list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["DATE_SELECTION","MULTIPLE_CHOICE","SINGLE_CHOICE","RANKING","RATING","YES_NO","TEXT_RESPONSE"]},"eventSlug":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"voteCount":{"type":"integer"}},"required":["id","text","voteCount"]}},"totalVotes":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","question","type","eventSlug","options","totalVotes","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Polls"],"summary":"Create a poll on an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["DATE_SELECTION","MULTIPLE_CHOICE","SINGLE_CHOICE","RANKING","RATING","YES_NO","TEXT_RESPONSE"]},"options":{"type":"array","items":{"type":"string","minLength":1}},"dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timeSlots":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["start","end"]},"maxItems":24}},"required":["date"]},"minItems":1,"maxItems":100},"allowMultiple":{"type":"boolean"},"textSettings":{"type":"object","properties":{"inputType":{"type":"string","enum":["short","long"]},"maxLength":{"type":"integer","minimum":1,"maximum":5000},"placeholder":{"type":"string","maxLength":200}},"required":["inputType"]}},"required":["question","type"]}}}},"responses":{"201":{"description":"Created poll","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["DATE_SELECTION","MULTIPLE_CHOICE","SINGLE_CHOICE","RANKING","RATING","YES_NO","TEXT_RESPONSE"]},"eventSlug":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"voteCount":{"type":"integer"}},"required":["id","text","voteCount"]}},"totalVotes":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","question","type","eventSlug","options","totalVotes","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid poll data, or the event is not a DRAFT (EVENT_NOT_DRAFT)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/polls/{pollId}":{"patch":{"tags":["Polls"],"summary":"Update a poll","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"pollId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":500},"dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timeSlots":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["start","end"]},"maxItems":24}},"required":["date"]},"minItems":1,"maxItems":100},"allowMultiple":{"type":"boolean"},"textSettings":{"type":"object","properties":{"inputType":{"type":"string","enum":["short","long"]},"maxLength":{"type":"integer","minimum":1,"maximum":5000},"placeholder":{"type":"string","maxLength":200}},"required":["inputType"]}}}}}},"responses":{"200":{"description":"Updated poll","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["DATE_SELECTION","MULTIPLE_CHOICE","SINGLE_CHOICE","RANKING","RATING","YES_NO","TEXT_RESPONSE"]}},"required":["id","question","type"]}},"required":["data"]}}}},"400":{"description":"Invalid poll update data, or the event is not a DRAFT (EVENT_NOT_DRAFT)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Poll not found on this event","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POLL_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"get":{"tags":["Polls"],"summary":"Get a poll by id","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"pollId","in":"path"}],"responses":{"200":{"description":"Poll","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"question":{"type":"string"},"type":{"type":"string","enum":["DATE_SELECTION","MULTIPLE_CHOICE","SINGLE_CHOICE","RANKING","RATING","YES_NO","TEXT_RESPONSE"]},"eventSlug":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"voteCount":{"type":"integer"}},"required":["id","text","voteCount"]}},"totalVotes":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","question","type","eventSlug","options","totalVotes","createdAt"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Poll not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POLL_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/polls/{pollId}/results":{"get":{"tags":["Polls"],"summary":"Get poll results","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"pollId","in":"path"}],"responses":{"200":{"description":"Poll results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pollId":{"type":"string"},"question":{"type":"string"},"totalVotes":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"optionId":{"type":"string"},"optionText":{"type":"string"},"voteCount":{"type":"integer"},"voters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"votedAt":{"type":"string"}},"required":["name","value","votedAt"]}}},"required":["optionId","optionText","voteCount","voters"]}}},"required":["pollId","question","totalVotes","results"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Poll not found on this event","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POLL_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/polls/{pollId}/vote":{"post":{"tags":["Polls"],"summary":"Submit a vote on a poll","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"pollId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"optionIds":{"type":"array","items":{"type":"string"}},"textResponse":{"type":"string","maxLength":5000},"ratings":{"type":"object","additionalProperties":{"type":"number"}}}}}}},"responses":{"200":{"description":"Vote submitted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"submitted":{"type":"boolean"}},"required":["submitted"]}},"required":["data"]}}}},"400":{"description":"Invalid vote data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Poll not found on this event","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POLL_NOT_FOUND","message":"Example error message","status":400}}}}}},"409":{"description":"Event is not accepting responses","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_ACCEPTING_RESPONSES","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/posts":{"get":{"tags":["Posts"],"summary":"List posts on a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["recent","popular","oldest"],"default":"recent"},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["all","pinned","announcements"],"default":"all"},"required":false,"name":"filterBy","in":"query"}],"responses":{"200":{"description":"Paginated posts list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"groupSlug":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"isPinned":{"type":"boolean"},"isLocked":{"type":"boolean"},"isAnnouncement":{"type":"boolean"},"replyCount":{"type":"integer"},"reactionCount":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"eventId":{"type":["string","null"]},"pollId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"editedAt":{"type":["string","null"]}},"required":["id","groupSlug","title","content","contentType","authorId","authorName","isPinned","isLocked","isAnnouncement","replyCount","reactionCount","tags","eventId","pollId","createdAt","updatedAt","editedAt"]}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"pageSize":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["total","page","pageSize","hasMore"]}},"required":["data","pagination"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Posts"],"summary":"Create a post on a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"content":{"type":"string","minLength":1,"maxLength":10000},"contentType":{"type":"string","enum":["markdown","html","plain"],"default":"markdown"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":20},"eventId":{"type":"string"},"pollId":{"type":"string"}},"required":["title","content"]}}}},"responses":{"201":{"description":"Created post","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"groupSlug":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"isPinned":{"type":"boolean"},"isLocked":{"type":"boolean"},"isAnnouncement":{"type":"boolean"},"replyCount":{"type":"integer"},"reactionCount":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"eventId":{"type":["string","null"]},"pollId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"editedAt":{"type":["string","null"]}},"required":["id","groupSlug","title","content","contentType","authorId","authorName","isPinned","isLocked","isAnnouncement","replyCount","reactionCount","tags","eventId","pollId","createdAt","updatedAt","editedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid post data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/posts/{postId}":{"get":{"tags":["Posts"],"summary":"Get a post with its replies","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"}],"responses":{"200":{"description":"Post with replies","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"groupSlug":{"type":"string"},"title":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"isPinned":{"type":"boolean"},"isLocked":{"type":"boolean"},"isAnnouncement":{"type":"boolean"},"replyCount":{"type":"integer"},"reactionCount":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"eventId":{"type":["string","null"]},"pollId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"editedAt":{"type":["string","null"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"parentReplyId":{"type":["string","null"]},"reactionCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"editedAt":{"type":["string","null"]}},"required":["id","postId","content","contentType","authorId","authorName","parentReplyId","reactionCount","createdAt","updatedAt","editedAt"]}}},"required":["id","groupSlug","title","content","contentType","authorId","authorName","isPinned","isLocked","isAnnouncement","replyCount","reactionCount","tags","eventId","pollId","createdAt","updatedAt","editedAt","replies"]}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Post not found on this moot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POST_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/posts/{postId}/replies":{"post":{"tags":["Posts"],"summary":"Create a reply on a post","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":true,"name":"postId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000},"contentType":{"type":"string","enum":["markdown","html","plain"],"default":"markdown"},"parentReplyId":{"type":"string"}},"required":["content"]}}}},"responses":{"201":{"description":"Created reply","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"postId":{"type":"string"},"content":{"type":"string"},"contentType":{"type":"string"},"authorId":{"type":"string"},"authorName":{"type":["string","null"]},"parentReplyId":{"type":["string","null"]},"reactionCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"editedAt":{"type":["string","null"]}},"required":["id","postId","content","contentType","authorId","authorName","parentReplyId","reactionCount","createdAt","updatedAt","editedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid reply data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Post not found on this moot","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"POST_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/groups/{slug}/documents":{"get":{"tags":["Documents"],"summary":"List documents for a moot","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string"},"required":false,"name":"folderId","in":"query"}],"responses":{"200":{"description":"Moot documents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer"},"mimeType":{"type":"string"},"fileUrl":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"folderId":{"type":["string","null"]},"folderName":{"type":["string","null"]},"uploadedById":{"type":"string"},"uploaderName":{"type":["string","null"]},"version":{"type":"integer"},"isLatestVersion":{"type":"boolean"},"downloadCount":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","fileName","fileSize","mimeType","fileUrl","title","description","tags","folderId","folderName","uploadedById","uploaderName","version","isLatestVersion","downloadCount","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/events/{slug}/invite":{"post":{"tags":["Invites"],"summary":"Create a shareable invite link for an event","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"slug","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000},"expiresIn":{"type":"string","enum":["1h","24h","7d","30d"]}}}}}},"responses":{"201":{"description":"Created invite link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"eventSlug":{"type":"string"},"url":{"type":"string"},"maxUses":{"type":["integer","null"]},"usedCount":{"type":"integer"},"validUntil":{"type":["string","null"]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","code","eventSlug","url","maxUses","usedCount","validUntil","isActive","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid invite link options","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/templates":{"get":{"tags":["Templates"],"summary":"List templates available to the current user","responses":{"200":{"description":"Templates list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":"string"},"icon":{"type":["string","null"]},"isPublic":{"type":"boolean"},"isSystemTemplate":{"type":"boolean"},"eventTitle":{"type":"string"},"usageCount":{"type":"integer"},"creatorId":{"type":"string"},"creatorName":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","description","category","icon","isPublic","isSystemTemplate","eventTitle","usageCount","creatorId","creatorName","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Templates"],"summary":"Create a template from an existing event","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventSlug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"category":{"type":"string","enum":["MEETING","PARTY","SURVEY","SOCIAL","EDUCATION","BUSINESS","CUSTOM"]},"icon":{"type":"string","maxLength":100},"isPublic":{"type":"boolean","default":false}},"required":["eventSlug","name"]}}}},"responses":{"201":{"description":"Created template","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":"string"},"icon":{"type":["string","null"]},"isPublic":{"type":"boolean"},"isSystemTemplate":{"type":"boolean"},"eventTitle":{"type":"string"},"usageCount":{"type":"integer"},"creatorId":{"type":"string"},"creatorName":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","name","description","category","icon","isPublic","isSystemTemplate","eventTitle","usageCount","creatorId","creatorName","createdAt"]}},"required":["data"]}}}},"400":{"description":"Invalid template data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Event not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"EVENT_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/templates/{id}/create-event":{"post":{"tags":["Templates"],"summary":"Instantiate a new event from a template","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"location":{"type":"string","maxLength":500},"timeZone":{"type":"string","maxLength":64,"description":"An IANA zone such as Europe/London. Abbreviations like EST are refused."},"privacyType":{"type":"string","enum":["PUBLIC","PRIVATE","INVITATION_ONLY"]}}}}}},"responses":{"201":{"description":"Created event","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","PUBLISHED","FINALIZED","CANCELLED"]},"location":{"type":["string","null"]},"timeZone":{"type":"string"},"privacyType":{"type":"string"},"organizerId":{"type":"string"},"organizerName":{"type":["string","null"]},"groupId":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"finalizedAt":{"type":["string","null"]},"responseDeadline":{"type":["string","null"]},"startTime":{"type":["string","null"]},"endTime":{"type":["string","null"]},"allDay":{"type":"boolean"},"date":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["slug","title","description","status","location","timeZone","privacyType","organizerId","organizerName","groupId","publishedAt","finalizedAt","responseDeadline","startTime","endTime","allDay","date","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid event data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Template not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"TEMPLATE_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/notifications":{"get":{"tags":["Notifications"],"summary":"List the current user's notifications","parameters":[{"schema":{"type":["boolean","null"],"default":false},"required":false,"name":"unreadOnly","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Notifications list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"read":{"type":"boolean"},"readAt":{"type":["string","null"]},"eventId":{"type":["string","null"]},"eventTitle":{"type":["string","null"]},"eventSlug":{"type":["string","null"]},"groupId":{"type":["string","null"]},"postId":{"type":["string","null"]},"replyId":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","type","title","message","read","readAt","eventId","eventTitle","eventSlug","groupId","postId","replyId","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/notifications/mark-read":{"post":{"tags":["Notifications"],"summary":"Mark notifications as read","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notificationIds":{"type":"array","items":{"type":"string"},"maxItems":100},"all":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Notifications marked as read","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"markedRead":{"type":"integer"}},"required":["markedRead"]}},"required":["data"]}}}},"400":{"description":"Must provide either notificationIds or all=true","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/recurring-patterns":{"get":{"tags":["Recurring Patterns"],"summary":"List recurring patterns for the authenticated user","parameters":[{"schema":{"type":"string"},"required":false,"name":"groupSlug","in":"query"}],"responses":{"200":{"description":"List of recurring patterns","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"groupSlug":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"frequency":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":["string","null"]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","groupSlug","name","description","frequency","startsAt","endsAt","isActive","createdAt","updatedAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}},"post":{"tags":["Recurring Patterns"],"summary":"Create a recurring pattern for a moot","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"groupSlug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"frequency":{"type":"string","enum":["WEEKLY","BIWEEKLY","MONTHLY"]},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"minItems":1,"maxItems":7},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"durationMinutes":{"type":"integer","minimum":15,"maximum":480},"startsAt":{"type":"string"},"endsAt":{"type":"string"}},"required":["groupSlug","name","frequency","daysOfWeek","startTime","durationMinutes","startsAt"]}}}},"responses":{"201":{"description":"Created recurring pattern","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"groupSlug":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"frequency":{"type":"string"},"startsAt":{"type":"string"},"endsAt":{"type":["string","null"]},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","groupSlug","name","description","frequency","startsAt","endsAt","isActive","createdAt","updatedAt"]}},"required":["data"]}}}},"400":{"description":"Invalid pattern data","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Moot not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"GROUP_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/recurring-patterns/{id}/instances":{"get":{"tags":["Recurring Patterns"],"summary":"List instances of a recurring pattern","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"List of pattern instances","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"patternId":{"type":"string"},"eventId":{"type":["string","null"]},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"actualEventDate":{"type":["string","null"]},"status":{"type":"string"},"sequence":{"type":"integer"},"isModified":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","patternId","eventId","periodStart","periodEnd","actualEventDate","status","sequence","isModified","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"404":{"description":"Recurring pattern not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"PATTERN_NOT_FOUND","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/calendars/busy-times":{"get":{"tags":["Calendars"],"summary":"Get busy-time blocks for a date range","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"startTime","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"endTime","in":"query"}],"responses":{"200":{"description":"Busy-time blocks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stale":{"type":"boolean"},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"title":{"type":["string","null"]},"isAllDay":{"type":"boolean"},"provider":{"type":"string"},"providerDisplayName":{"type":["string","null"]}},"required":["id","startTime","endTime","title","isAllDay","provider","providerDisplayName"]}}},"required":["stale","blocks"]}},"required":["data"]}}}},"400":{"description":"Invalid query parameters — startTime and endTime are required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"VALIDATION_ERROR","message":"Example error message","status":400}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}},"/v1/calendars":{"get":{"tags":["Calendars"],"summary":"List connected calendar accounts","responses":{"200":{"description":"Connected calendar accounts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"email":{"type":["string","null"]},"displayName":{"type":["string","null"]},"isActive":{"type":"boolean"},"lastSyncAt":{"type":["string","null"]},"lastSyncStatus":{"type":["string","null"]},"syncBusyBlocks":{"type":"boolean"},"autoAddFinalizedEvents":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","provider","email","displayName","isActive","lastSyncAt","lastSyncStatus","syncBusyBlocks","autoAddFinalizedEvents","createdAt"]}}},"required":["data"]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INVALID_API_KEY","message":"Example error message","status":400}}}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"FORBIDDEN","message":"Example error message","status":400}}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Example error message","status":400}}}}}},"500":{"description":"Unexpected server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"integer"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message","status"]}},"required":["error"],"example":{"error":{"code":"INTERNAL_ERROR","message":"Example error message","status":400}}}}}}}}}},"webhooks":{}}