iCalendar (.ics) Generator API

Create .ics calendar files for Google, Apple and Outlook: events, all-day events, recurrence, reminders, and yearly events on a lunar date (giỗ, rằm) expanded to solar dates.

POSTGEThttps://apibox.io.vn/v1/ics
Developer utilities▶ Try it online

The ICS API builds iCalendar files (RFC 5545) that every calendar app imports: Google Calendar, Apple Calendar, Outlook, Thunderbird. Send one event as parameters or many as a JSON events array, each with a title, start (YYYY-MM-DDTHH:MM in Vietnam time, or a date for all-day events), end or duration_minutes, location, description, URL, recurrence rule (rrule, e.g. FREQ=WEEKLY;COUNT=10) and reminders (alarm_minutes). Text is escaped and long lines folded as the standard requires, and a VTIMEZONE for Asia/Ho_Chi_Minh is included.

Standard calendars cannot repeat an event on a lunar date. With lunar: { day: 10, month: 3, years: 10 } the API computes the solar date of that lunar date for each year (10/3 âm lịch → 26/4/2026, 16/4/2027…) and writes one event per year: death anniversaries (giỗ), rằm and mùng 1, lunar birthdays, Hung Kings Day. A day 30 in a 29-day month falls on the last day of the month.

The response is a downloadable .ics file; format=json returns the file content and the list of computed dates instead.

Parameters

NameInTypeRequiredDefault
eventsbodyarraynoEvents: {title, start, end, duration_minutes, all_day, location, description, url, rrule, alarm_minutes, lunar}.
titlebody|querystringnoSingle event: title (with start or lunar).
startbody|querystringnoYYYY-MM-DD or YYYY-MM-DDTHH:MM (Vietnam time).
lunarquerystringnoSingle event on a lunar date DD/MM, with years and from_year.
namebody|querystringnoCalendar name.
formatbody|querystringnoicsics (file) or json.

Example

curl -X POST "https://apibox.io.vn/v1/ics" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Lịch gia đình","format":"json","events":[{"title":"Giỗ ông nội","lunar":{"day":10,"month":3,"years":3,"from_year":2026},"all_day":true,"alarm_minutes":1440}]}'

Response

{
  "events": 3,
  "occurrences": [
    {
      "title": "Giỗ ông nội",
      "date": "2026-04-26"
    },
    {
      "title": "Giỗ ông nội",
      "date": "2027-04-16"
    },
    {
      "title": "Giỗ ông nội",
      "date": "2028-04-04"
    }
  ],
  "ics": "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//APIBox//ics//VI\r\n…"
}

Use cases

  • “Add to calendar” buttons for bookings, webinars and events
  • Family calendars of death anniversaries and rằm on lunar dates
  • Export schedules from HR, school and booking systems
  • Recurring reminders for subscriptions and deadlines

FAQ

How do I repeat an event every lunar year?

Use lunar: { day, month, years, from_year }. Calendar apps have no lunar recurrence, so the API writes one event per year with the right solar date.

Which time zone is used?

Times are Vietnam time (Asia/Ho_Chi_Minh, UTC+7); the file includes the time zone definition so apps abroad show the right local time.

Can I add reminders?

Yes, alarm_minutes (a number or an array of up to 5) adds display alarms before the event.

Related APIs

Start with 1,000 free requests every month. Get free API key →