{"openapi":"3.0.3","info":{"title":"ICS / iCalendar Feed Sanitizer & Validator API","version":"1.0.0","description":"Repairs malformed RFC 5545 .ics calendar feeds, maps proprietary Windows/Exchange TZIDs to IANA timezones, fixes inverted DTSTART/DTEND dates, and sanitizes conflicting RRULEs."},"servers":[{"url":"https://api.tinplate.dev","description":"Production Edge Gateway"}],"components":{"schemas":{"IcsSanitizeResponseData":{"type":"object","properties":{"valid":{"type":"boolean","example":true},"sanitized_ics":{"type":"string"},"event_count":{"type":"integer","minimum":0},"events":{"type":"array","items":{"type":"object","properties":{"uid":{"type":"string"},"summary":{"type":"string","nullable":true},"dtstart":{"type":"string","nullable":true},"dtend":{"type":"string","nullable":true},"timezone":{"type":"string","nullable":true},"rrule":{"type":"string","nullable":true}},"required":["uid","summary","dtstart","dtend","timezone","rrule"]}},"repairs":{"type":"array","items":{"type":"string"}},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string"}},"required":["code","severity","message"]}}},"required":["valid","sanitized_ics","event_count","events","repairs","issues"]},"IcsSanitizeRequest":{"type":"object","properties":{"ics":{"type":"string","minLength":1,"maxLength":262144,"example":"BEGIN:VCALENDAR\nBEGIN:VEVENT\nSUMMARY:Sprint Review; Q4\nDTSTART;TZID=\"Central European Standard Time\":20261120T140000\nDTEND;TZID=\"Central European Standard Time\":20261120T130000\nRRULE:FREQ=WEEKLY;COUNT=5;UNTIL=20261231T000000Z\nEND:VEVENT\nEND:VCALENDAR","description":"Raw .ics (RFC 5545 iCalendar) text to validate, repair, and normalize."},"normalize_windows_timezones":{"type":"boolean","default":true,"example":true,"description":"Map proprietary Windows/Exchange TZIDs ('Central European Standard Time') to IANA timezones ('Europe/Budapest')."},"fix_inverted_dates":{"type":"boolean","default":true,"example":true,"description":"Swap DTSTART and DTEND when DTEND is earlier than DTSTART."}},"required":["ics"]},"ResponseMeta":{"type":"object","required":["request_id"],"properties":{"request_id":{"type":"string","format":"uuid"},"ms":{"type":"integer","minimum":0},"version":{"type":"string","example":"1.0.0"}}},"ErrorEnvelope":{"type":"object","required":["ok","error","meta"],"properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string","example":"Request body failed validation"}}},"meta":{"$ref":"#/components/schemas/ResponseMeta"}}}},"parameters":{}},"paths":{"/v1/ics-sanitizer":{"post":{"tags":["25_ICS_SANITIZER"],"summary":"Validate and repair an RFC 5545 .ics calendar feed","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IcsSanitizeRequest"}}}},"responses":{"200":{"description":"Sanitized CRLF .ics string, parsed events, applied repairs, and RFC 5545 issues","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/IcsSanitizeResponseData"},"meta":{"$ref":"#/components/schemas/ResponseMeta"}},"required":["ok","data","meta"]}}}},"400":{"description":"Invalid input or malformed JSON request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid authentication credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request payload exceeds subscribed plan byte cap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}