Skip to content

How to create iCloud calendar events

Apple has no public calendar REST API. Creating events on iCloud Calendar natively means constructing iCalendar (ICS) payloads wrapped in XML envelopes and sending them over CalDAV, a protocol that requires persistent connections and manual credential management. Nylas handles all of that for you and exposes iCloud Calendar through the same Events API you use for Google and Microsoft.

This guide walks through creating events on iCloud Calendar accounts, including the app-specific password requirement, participant notification behavior, and the iCloud-specific limitations you should plan around.

CalDAV is functional, but building event creation on it directly comes with real costs:

  • ICS format construction. Creating an event means building a valid iCalendar object with correct VTIMEZONE blocks, VEVENT properties, and RRULE syntax, all wrapped in a CalDAV PUT request. Nylas gives you a JSON body and a single POST endpoint.
  • No conferencing auto-create. Google can generate Meet links automatically when you create an event. Microsoft can attach Teams links. CalDAV has nothing comparable. You would need to integrate with a conferencing provider separately.
  • No room resources. CalDAV does not support the concept of room or resource booking. If your app needs meeting rooms, iCloud cannot provide them natively.
  • No programmatic password generation. Every user must manually create an app-specific password through their Apple ID settings. This step cannot be automated.
  • Connection management. You need to maintain CalDAV sessions per user, handle reconnections, and manage sync state yourself. Nylas does this behind the scenes.

If you only target iCloud and are comfortable with iCalendar format, CalDAV works. For multi-provider apps or faster development, Nylas removes the protocol-level complexity entirely.

You’ll need:

  • A Nylas application with a valid API key
  • A grant for an iCloud account using the iCloud connector (not generic IMAP)
  • An iCloud connector configured in your Nylas application

New to Nylas? Start with the quickstart guide to set up your app and connect a test account before continuing here.

iCloud requires app-specific passwords for third-party access. Unlike Google or Microsoft OAuth, there’s no way to generate these programmatically. Each user must create one manually in their Apple ID settings.

Nylas supports two authentication flows for iCloud:

MethodBest for
Hosted OAuthProduction apps where Nylas guides users through the app password flow
Bring Your Own (BYO) AuthenticationCustom auth pages where you collect credentials directly

With either method, users need to:

  1. Go to appleid.apple.com and sign in
  2. Navigate to Sign-In and Security then App-Specific Passwords
  3. Generate a new app password
  4. Use that password (not their regular iCloud password) when authenticating

App-specific passwords can’t be generated via API. Your app’s onboarding flow should include clear instructions telling users how to create one. Users who enter their regular iCloud password will fail authentication.

The full setup walkthrough is in the iCloud provider guide and the app passwords guide.

Make a Create Event request with the grant ID and a calendar_id query parameter. Nylas creates the event on the specified calendar and returns the new event object with its id.

iCloud does not support calendar_id=primary. You must call the List Calendars endpoint first to get the actual calendar ID for the account. The default calendar name varies by language and region, so always discover calendar IDs dynamically.

You’re about to send a real event invite! The following samples send an email from the account you connected to the Nylas API to any email addresses in the participants sub-object. Make sure you actually want to invite those addresses before running this request.

For iCloud accounts, replace <CALENDAR_ID> in these samples with an actual calendar ID from the List Calendars response. The primary shortcut that works for Google and Microsoft is not available on iCloud.

When you include participants in your create event request and set notify_participants=true (the default), Nylas sends invitation emails to each participant. On iCloud, these invitations go out as ICS file attachments via email, which is how CalDAV handles event notifications natively.

This is simpler than the notification systems on Google and Microsoft. There are no push notifications, no in-app notification bells, and no rich invitation cards. Participants receive a standard email with an ICS attachment they can accept or decline.

When notify_participants=false, Nylas creates the event on the organizer’s calendar only. Participants do not receive an invitation email and the event does not appear on their calendars.

A few things to keep in mind:

  • CalDAV sends invitations as ICS files. Some email clients render these as calendar invites with accept/decline buttons, while others show them as plain attachments.
  • There is no way to customize the invitation email body through CalDAV. The content is generated automatically based on the event details.
  • Participant response status (accepted, declined, tentative) syncs back through CalDAV, but with the latency you would expect from a polling-based protocol.

iCloud Calendar runs on CalDAV, which gives it a different feature profile than Google or Microsoft. Here’s what matters when creating events.

Google and Microsoft both support calendar_id=primary as a shorthand for the user’s default calendar. iCloud does not. You must call the List Calendars endpoint first and pick the correct calendar ID from the response.

The default calendar name varies by language and region. English accounts typically have a calendar called “Calendar” or “Home”, but don’t hardcode that. Always discover calendar IDs dynamically.

Google can automatically generate Meet links when you create an event, and Microsoft can attach Teams links. iCloud has no equivalent. CalDAV does not support any conferencing integration.

If your users need a video call link on the event, you can include the URL in the location or description field manually. This works, but you will need to handle the conferencing provider integration yourself.

iCloud does not support the resources field. CalDAV has no concept of room or resource booking. If your app needs meeting room scheduling alongside event creation, iCloud cannot provide it. Events that include resources in the request body will have that field ignored.

CalDAV supports the core event fields and not much else. On iCloud:

  • title, when, participants, description, location, and recurrence all work as expected
  • event_type is not available (no focus time, out of office, or working location support)
  • color_id is not exposed through CalDAV. Calendar and event colors are managed locally in the Apple Calendar app
  • capacity is not supported

The core fields cover most use cases. If your app depends on extended event properties, test against iCloud specifically to confirm what comes back.

Use the datespan format for all-day events, the same as Google and Microsoft. Set the when object with a start_date and end_date in YYYY-MM-DD format. The end date is exclusive, so a single-day event on March 5 would use start_date: "2026-03-05" and end_date: "2026-03-06".

Standard RRULE support works through CalDAV using iCalendar (RFC 5545) recurrence rules. Nylas expands recurring events into individual instances, just like it does for other providers. You can create recurring events by including an recurrence array in the request body.

For details on managing recurring event series, see the recurring events guide.

If a user revokes their app-specific password through their Apple ID settings, all API calls for that grant will fail. There is no way to detect a revoked password proactively. Use webhooks to listen for grant.expired events so your app can prompt the user to re-authenticate.

Your onboarding flow should set clear expectations: if the user deletes their app password, their calendar integration stops working until they create a new one.

CalDAV sync can be slower than Google’s push notifications or Microsoft’s change subscriptions. Events you create through the API may take a few minutes to appear in Apple Calendar apps on the user’s devices. This latency is inherent to CalDAV and not something Nylas or your app can control.

Use webhooks rather than polling to detect changes. Nylas monitors for updates and sends notifications when events are created, updated, or deleted.