Dokaz API › Docs › Calendar (.ics) files
iCalendar (.ics) file API: bookings to calendar events
Booking confirmations, class schedules and webinar sign-ups all end with the same request: put it in my calendar. An .ics file does that everywhere, but hand-written ones break on the details - a comma in the location, a line over 75 bytes, a time with no zone that lands three hours off.
This endpoint writes RFC 5545 exactly: text escaped, long lines folded without splitting a character, times converted to UTC from the offset you give, and a stable UID so sending the same booking twice updates the event instead of duplicating it. A time without an offset is refused rather than guessed.
Repeating events take a time zone: add "tz": "America/Los_Angeles" (any IANA name) and the file carries the event in that zone's local time with a VTIMEZONE describing its daylight saving rules, so a weekly 9:00 class is at 9:00 in March and in November - not an hour off after the clocks change, as a repeat written in UTC would be.
Request
curl -X POST https://api.dokaz.net/v1/calendar/ics \
-H "content-type: application/json" \
-d '{"title":"Kitchen remodel consult","start":"2026-10-05T14:00:00-07:00","end":"2026-10-05T15:00:00-07:00","location":"1200 Market St, San Francisco, CA","description":"Bring photos of the space.","reminder_minutes":60}'
curl -X POST https://api.dokaz.net/v1/calendar/ics \
-H "content-type: application/json" \
-d '{"title":"Yoga","start":"2026-10-06T18:00:00","end":"2026-10-06T19:00:00","tz":"America/Los_Angeles","repeat":{"freq":"weekly","by_day":["TU","TH"],"count":12}}' -o yoga.ics
The response is text/calendar (Content-Disposition: attachment), ready to attach to an email or serve as a download. Send {"name": "...", "events": [...]} for up to 100 events in one file. The body limit is 256 KB.
Pricing
100 calls a day are free with no key. Need more? Starter is $9/month for 10,000 calls across every product, key issued instantly.
Questions
Why must times have an offset?
Because "2026-10-05T14:00" is a different moment in every time zone, and a calendar file that guesses shows the wrong hour to someone. Send Z or an offset like -07:00; the file stores UTC and each calendar shows it in its owner's zone. Or name the zone with tz, and a local time like "2026-10-05T14:00:00" is read in it (a time the clocks skip or repeat is refused - add the offset to say which).
Why does my weekly event move by an hour after the clocks change?
A repeat written in UTC repeats every 7 x 24 hours, so 9:00 in Los Angeles becomes 8:00 in November. Add "tz": "America/Los_Angeles": the file then says 9:00 Los Angeles time with the zone's rules included, and every calendar keeps it at 9:00. A zone whose clock changes follow no fixed yearly rule (Morocco's follow Ramadan) can only take a repeat with a count or an until.
How do all-day events work?
Send dates without times: "start": "2026-12-24", "end": "2026-12-26" is a three-day event (the end date is inclusive; the file carries the standard exclusive end for you).
Will sending an updated booking duplicate it?
Not if the title, start, end and location are unchanged, or if you pass your own uid (your booking ID, say): the same UID tells the calendar it is the same event.