Create .ics Calendar File Online
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.
Result
Press “Run” to see the result.
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.
Use this in your code
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}]}'const res = await fetch('https://apibox.io.vn/v1/ics', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"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
}
]
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/ics",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"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}]},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/ics');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"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 = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
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.