{"openapi":"3.1.0","info":{"title":"MyWeekly Calendar API","version":"1.0.0","description":"Read and create calendar events for the MyWeekly user who issued the API key.","contact":{"name":"MyWeekly Support","email":"imalko.jr@gmail.com"}},"servers":[{"url":"https://myweekly.cc","description":"Production"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/calendar/events":{"get":{"operationId":"listCalendarEvents","summary":"List calendar events","parameters":[{"name":"timeMin","in":"query","schema":{"type":"string","format":"date-time"},"description":"Inclusive ISO 8601 range start"},{"name":"timeMax","in":"query","schema":{"type":"string","format":"date-time"},"description":"Exclusive ISO 8601 range end"}],"responses":{"200":{"description":"Accessible calendars and events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"operationId":"createCalendarEvent","summary":"Create a calendar event","description":"Requires an API key with calendar:write scope.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvent"}}}},"responses":{"201":{"description":"Event created"},"400":{"description":"Invalid event data"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"MyWeekly API key"}},"responses":{"Unauthorized":{"description":"Invalid, expired, revoked or insufficient API key"}},"schemas":{"CreateEvent":{"type":"object","required":["title","startsAt","endsAt"],"properties":{"title":{"type":"string","maxLength":300},"calendarId":{"type":"string"},"calendar":{"type":"string","default":"Личное"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"allDay":{"type":"boolean","default":false},"description":{"type":"string"},"location":{"type":"string"}}},"EventList":{"type":"object","properties":{"calendars":{"type":"array","items":{"type":"object"}},"events":{"type":"array","items":{"type":"object"}}}}}}}