apyhub
Cover illustration for What Is an ICS File? How to Create, Open, and Import Calendar Invites (2026)
ApyHub

What Is an ICS File? How to Create, Open, and Import Calendar Invites (2026)

What Is an ICS File? How to Create, Open, and Import Calendar Invites (2026)

01Introduction

An ICS file (.ics) is a calendar file. It stores one or more events, such as a meeting, a webinar, or a flight, in the iCalendar format, a plain-text standard that Google Calendar, Outlook, and Apple Calendar all understand. When you click "Add to calendar" in an email or download an invite, you're almost always opening an ICS file.

This guide covers what's inside an ICS file, how to open and import one in every major calendar app, and the problems developers actually hit: events landing at the wrong time, updates that create duplicates, and cancellations that don't cancel.

If you need to create ICS files from your own app, for booking confirmations, demo scheduling, or webinar sign-ups, ApyHub's ICS Generator API does it in one request: send the event details as JSON and get back a valid .ics invite with time zones, attendees, reminders, recurring events, and cancellations handled for you. Jump to the API section.

<div style="background:#1A1A22;color:#F8F1DA;border-left:6px solid #BC4A63;border-radius:12px;padding:24px 28px;margin:32px 0;"> <p style="margin:0 0 6px;font-family:'JetBrains Mono',monospace;font-size:12px;letter-spacing:0.12em;text-transform:uppercase;color:#BC4A63;">ICS Generator API</p> <p style="margin:0 0 16px;font-size:20px;font-weight:800;line-height:1.3;">Turn event details into a valid .ics invite with one request.</p> <a href="https://apyhub.com/apyhub/service/generate-ical-event" style="display:inline-block;background:#BC4A63;color:#F8F1DA;font-weight:700;padding:10px 20px;border-radius:8px;text-decoration:none;">Try it free →</a> </div>

02What's inside an ICS file

An ICS file is plain text, so you can open it in any text editor. The iCalendar format is defined by RFC 5545, and a minimal meeting invite looks like this:

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp//Booking App//EN METHOD:REQUEST BEGIN:VEVENT UID:[email protected] DTSTAMP:20260917T080000Z DTSTART:20261015T070000Z DTEND:20261015T073000Z SUMMARY:Product demo LOCATION:https://meet.example.com/demo DESCRIPTION:30-minute walkthrough of the product. ORGANIZER;CN=Sales Team:mailto:[email protected] ATTENDEE;RSVP=TRUE:mailto:[email protected] SEQUENCE:0 BEGIN:VALARM TRIGGER:-PT15M ACTION:DISPLAY DESCRIPTION:Reminder END:VALARM END:VEVENT END:VCALENDAR

The parts that matter most:

FieldWhat it means
SUMMARYThe event title
DTSTART, DTENDStart and end time (a trailing Z means UTC)
LOCATIONWhere the event happens, including meeting links
ORGANIZER, ATTENDEEWho sent the invite and who's invited
UIDA permanent ID that lets calendars recognize updates to the same event
VALARMA reminder, here 15 minutes before the start

ICS vs iCal vs iCalendar: they're the same thing. iCalendar is the standard, .ics is the file extension, and "iCal" is the common nickname (and the old name of Apple's calendar app).

03How to open or import an ICS file

Import an ICS file into Google Calendar

Google Calendar imports ICS files from a computer, following Google's own steps:

  1. Open Google Calendar in a browser.
  2. Click the gear icon, then Settings.
  3. In the left menu, click Import & export.
  4. Click Select file from your computer and choose the .ics file.
  5. Pick the calendar to add the events to, then click Import.

On a phone: the Google Calendar app has no import option. Open calendar.google.com in your phone's browser, switch to the desktop site, and follow the same steps.

Import vs subscribe: importing copies the events once. If the source calendar keeps changing, such as a team schedule or sports fixtures, use Other calendars → From URL with the .ics link instead, so Google keeps it updated.

Open an ICS file in Outlook

  • Outlook for Windows or Mac: double-click the .ics file, check the event, and click Save & Close.
  • Outlook on the web: go to Calendar → Add calendar → Upload from file, choose the file, and pick a calendar.
  • Invite emails: when an email includes an ICS invite, Outlook shows Accept / Tentative / Decline buttons directly.

Open an ICS file in Apple Calendar

  • Mac: double-click the file, or use File → Import in Calendar.
  • iPhone and iPad: tap the .ics attachment in Mail or Files, then tap Add All.

04How to create an ICS file

1. By hand

Copy the example above into a text editor, change the details, and save it with the .ics extension. This works for a one-off event, but small formatting mistakes can stop the file from importing (see the common problems below).

2. In Python

For a simple event, a few lines of Python are enough:

python

· python
from datetime import datetime, timezone
import uuid

def make_ics(summary, start, end, location=""):
    now = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
    fmt = lambda dt: dt.astimezone(timezone.utc).strftime("%Y%m%dT%H%M%SZ")
    lines = [
        "BEGIN:VCALENDAR",
        "VERSION:2.0",
        "PRODID:-//Example Corp//Booking App//EN",
        "BEGIN:VEVENT",
        f"UID:{uuid.uuid4()}@example.com",
        f"DTSTAMP:{now}",
        f"DTSTART:{fmt(start)}",
        f"DTEND:{fmt(end)}",
        f"SUMMARY:{summary}",
        f"LOCATION:{location}",
        "END:VEVENT",
        "END:VCALENDAR",
    ]
    return "\r\n".join(lines) + "\r\n"

start = datetime(2026, 10, 15, 9, 0, tzinfo=timezone.utc)
end = datetime(2026, 10, 15, 9, 30, tzinfo=timezone.utc)
with open("invite.ics", "w", newline="") as f:
    f.write(make_ics("Product demo", start, end, "Online"))

This covers a basic event. Once you need recurring events, reminders, attendees, local time zones, or cancellations, the edge cases add up quickly: text escaping for commas and semicolons, line folding, RRULE syntax, and time zone definitions. That's where libraries such as icalendar for Python, or an API, save time.

3. With an API

When ICS files are part of your product, generating them yourself means owning every edge case: time zones, recurrence rules, escaping, updates, and cancellations. An API takes that off your plate. The next section shows how with ApyHub.

05Generate ICS files with the ApyHub ICS Generator API

The ICS Generator API turns plain JSON into a ready-to-send calendar invite. You describe the event; the API writes a valid iCalendar file that opens in Google Calendar, Outlook, and Apple Calendar.

What it handles for you:

FeatureHow you set it
Event detailssummary, description, location
Date and timemeeting_date (YYYY-MM-DD), start_time and end_time (HH:MM)
Time zonestime_zone, any IANA name such as Europe/Amsterdam or America/New_York
All-day eventsall_day: true
Organizer and attendeesorganizer_email, attendees_emails
Recurring eventsrecurring: true plus recurrence with frequency (DAILY, WEEKLY, MONTHLY, YEARLY), interval, and count
Remindersreminders, each with minutes_before and action (display or email)
UpdatesReuse the same id and increase sequence
CancellationsSame id with ?event_type=cancel
File name?output=my-invite

Two ways to get the file:

  • POST /generate-ical-event/download returns the .ics file itself, ready to attach to an email.
  • POST /generate-ical-event/link returns a signed link to the file, ready to put in a button or message.

Example: a weekly meeting with a reminder

bash

· bash
curl -X POST "https://api.eu.apyhub.com/apyhub/generate-ical-event/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "[email protected]",
    "summary": "Weekly Team Sync",
    "description": "Project updates and action items.",
    "meeting_date": "2026-10-15",
    "start_time": "09:00",
    "end_time": "09:30",
    "time_zone": "Europe/Amsterdam",
    "location": "https://meet.example.com/sync",
    "organizer_email": "[email protected]",
    "attendees_emails": ["[email protected]", "[email protected]"],
    "recurring": true,
    "recurrence": { "frequency": "WEEKLY", "interval": 1, "count": 10 },
    "reminders": [{ "action": "display", "minutes_before": 15 }]
  }'

Response:

json

· json
{
  "data": "https://storage.example.com/invite_2026-10-15_abc123.ics?sig=abc123"
}

Need the file itself to attach to an email? Call the /download endpoint with the same body. To cancel the meeting later, send the same id with ?event_type=cancel. The API page has the full reference and a live playground.

Where teams use it: booking and scheduling apps, demo and sales confirmations, webinar and event registrations, course and class schedules, appointment reminders, and internal tools that send team events. It runs on the same ApyHub key as the rest of the catalog, and you can start on the free tier with no card required.

06How to send a calendar invite by email

To make an email show up as a real invite, with an "Add to calendar" or "Accept" option, attach the ICS file:

  1. Generate the file with METHOD:REQUEST, an ORGANIZER, and at least one ATTENDEE.
  2. Attach it as invite.ics with the content type text/calendar; method=REQUEST.
  3. Send the email from the organizer's address, so calendar apps trust the invite.

Most booking tools, CRMs, and webinar platforms work this way: the app generates the ICS file and attaches it to the confirmation email. Check attendee addresses first with the Email Validation API so invites don't bounce.

07ICS file vs "Add to calendar" link

An "Add to calendar" link opens a pre-filled event in one calendar app. Google Calendar links look like this:

text

https://calendar.google.com/calendar/render?action=TEMPLATE&text=Product%20demo&dates=20261015T070000Z/20261015T073000Z&details=30-minute%20walkthrough&location=Online
"Add to calendar" linkICS file
Works withOne calendar app per linkGoogle, Outlook, Apple, and most others
Attendees and RSVPsNoYes
Reminders and recurrenceLimitedYes
Updates and cancellationsNoYes, with UID and SEQUENCE
Best forLanding pages and simple one-off eventsInvites, confirmations, and anything that might change

Many sites offer both: a Google Calendar link for quick adds, and an ICS download for everything else.

08Common ICS problems and how to fix them

The event shows at the wrong time. The time has no time zone, so each calendar guesses. Write times in UTC with a trailing Z (20261015T070000Z), or include a TZID with a matching time zone definition. The ICS Generator API handles this when you pass time_zone.

An update creates a duplicate event. The update used a new UID. Keep the same UID for the life of the event and increase SEQUENCE by one with each change. With the ICS Generator API, reuse the same id and raise sequence.

A cancellation doesn't remove the event. Send a file with METHOD:CANCEL, the same UID, and a higher SEQUENCE. With the ICS Generator API, send the same id with ?event_type=cancel.

The file won't import, or text looks broken. The iCalendar format (RFC 5545) is strict about a few details. Check that every line ends with a CRLF line break, lines longer than 75 bytes are folded onto the next line (starting with a space), commas, semicolons, and backslashes in text are escaped, and every event has a UID and DTSTAMP. The file must start with BEGIN:VCALENDAR and end with END:VCALENDAR.

Google Calendar on mobile can't open the file. The app doesn't support imports. Use a browser in desktop mode, or tap the file in Mail on iPhone to add it to Apple Calendar.

Recurring events arrive as separate events. The recurrence was written as individual events. Use a single event with an RRULE, or set recurring and recurrence in the API.

09Creating calendar invites with AI agents

AI assistants that book meetings or plan events need to produce real invites, not only text. The ICS Generator API is available through ApyHub MCP, so an agent can turn "set up a weekly sync with Alex and Sam, Thursdays at 9" into a valid .ics invite without a custom integration. New to MCP? Read what is MCP.

10Conclusion

An ICS file is the universal format for sharing calendar events. It's plain text, it works in every major calendar, and it supports everything invites need: attendees, reminders, recurring events, updates, and cancellations.

Importing one takes a few clicks. Creating one by hand works for a single event, but as soon as time zones, recurrence, and updates come in, a generator saves you from the edge cases. The ICS Generator API turns JSON into a valid invite in one request.

<div style="background:#F8F1DA;color:#1A1A22;border:2px solid #7A2238;border-radius:12px;padding:24px 28px;margin:32px 0;"> <p style="margin:0 0 6px;font-family:'JetBrains Mono',monospace;font-size:12px;letter-spacing:0.12em;text-transform:uppercase;color:#7A2238;">Start free</p> <p style="margin:0 0 8px;font-size:20px;font-weight:800;line-height:1.3;">Generate your first .ics invite in minutes.</p> <p style="margin:0 0 16px;color:#5A5A66;">The Starter plan is free, with 3,000 atoms a month and MCP access. No card required.</p> <a href="https://apyhub.com/apyhub/service/generate-ical-event" style="display:inline-block;background:#7A2238;color:#F8F1DA;font-weight:700;padding:10px 20px;border-radius:8px;text-decoration:none;margin-right:8px;">Try the ICS Generator API →</a> <a href="https://apyhub.com/catalog" style="display:inline-block;border:1px solid #7A2238;color:#7A2238;font-weight:700;padding:10px 20px;border-radius:8px;text-decoration:none;">Browse all APIs</a> </div>

11FAQ

What is an ICS file? An ICS file is a plain-text calendar file in the iCalendar format. It stores events that Google Calendar, Outlook, Apple Calendar, and most other calendar apps can open.

How do I import an ICS file into Google Calendar? On a computer, open Google Calendar, go to Settings → Import & export, select the .ics file, choose a calendar, and click Import.

How do I open an ICS file? Double-click it to open it in your default calendar app, or import it through your calendar's import option. You can also read it in any text editor.

Is an ICS file safe to open? ICS files are plain text and can't run code. Still, only add events from senders you trust, since invites can contain misleading links.

What's the difference between ICS and iCal? They're the same format. iCalendar is the standard, .ics is the file extension, and "iCal" is a common nickname.

How do I create an ICS file? Write one in a text editor, generate it in code with a library, or send the event details as JSON to the ICS Generator API.

How do I make a calendar invite that people can accept? Create an ICS file with METHOD:REQUEST, an organizer, and attendees, then attach it to an email as text/calendar.

Why does my event show at the wrong time? The file didn't specify a time zone. Use UTC times ending in Z, or include a TZID.

How do I update or cancel an event I already sent? Send a new file with the same UID and a higher SEQUENCE. For a cancellation, also set METHOD:CANCEL. With the ICS Generator API, reuse the event id and add ?event_type=cancel to cancel.

Can I import an ICS file on my phone? Not in the Google Calendar app. Use a mobile browser in desktop mode, or on iPhone, tap the file to add it to Apple Calendar.

Is there an API to generate ICS files? Yes. ApyHub's ICS Generator API creates .ics invites from JSON, with time zones, attendees, reminders, recurring events, and cancellations. It returns the file or a signed link, and you can start on the free tier.

Can AI agents create calendar invites? Yes. The ICS Generator API is available to agents through ApyHub MCP.

12About ApyHub

ApyHub is a curated API catalog and trusted operational layer for developers and AI agents, with over 1,500 endpoints or capabilities and growing. Teams use the whole catalog through a single subscription priced in atoms, a unit that reflects the actual work each call performs. Every endpoint ships with machine-readable certification aligned with GDPR, SOC 2, and ISO 27001, and is MCP-ready by default, so AI agents can discover and call it through ApyHub MCP without custom wrappers. ApyHub is headquartered in Amsterdam, with offices in the Netherlands, Greece, and India, and serves 65,000+ developer workspaces every month. The free Starter plan includes 3,000 atoms per month, with no card required. Building an API of your own? Become a provider →