Subscribe to a calendar
const url = 'https://calendar.work.optidata.cloud/api/calendars/sync/b7f3c1a29e5d4f08a1c6d2b4e8f70931';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://calendar.work.optidata.cloud/api/calendars/sync/b7f3c1a29e5d4f08a1c6d2b4e8f70931Streams a calendar as an iCalendar (.ics) feed, for external calendar
applications that subscribe to a URL and re-read it periodically.
Authentication is the token in the path, not the authentication key: the URL alone grants read access to the calendar, so treat it as a secret and revoke it in Optiwork when it is no longer needed. A revoked or expired token stops resolving.
The feed is read-only. Nothing an external application changes in its local copy travels back.
A token that no longer resolves is currently answered with a 500 HTML
page rather than the 404 this endpoint is meant to return. Treat any
non-200 answer as “this subscription is gone”; the response will become
a proper 404 once the defect is fixed.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The subscription token. Generate it for a calendar in Optiwork; it can be revoked there at any time.
Responses
Section titled “ Responses ”The calendar as an iCalendar document.
Examples
BEGIN:VCALENDARVERSION:2.0PRODID:-//Optidata//Optiwork Calendar//ENBEGIN:VEVENTUID:de373eee-9440-4420-a53b-1be5ccd4eb18DTSTART:20260824T170000ZDTEND:20260824T180000ZSUMMARY:Sprint reviewLOCATION:Meeting room 2END:VEVENTEND:VCALENDARThe intended answer when the token is unknown, revoked or expired.
Not yet what the service returns — see the 500 below.
What an unknown, revoked or expired token answers today: an HTML
error page instead of the 404 above. Documented because it is the
live behaviour, not a contract to rely on.