Internet-Draft | JMAP Calendars | November 2024 |
Jenkins & Douglass | Expires 11 May 2025 | [Page] |
This document specifies a data model for synchronizing calendar data with a server using JMAP. Clients can use this to efficiently read, write, and share calendars and events, receive push notifications for changes or event reminders, and keep track of changes made by others in a multi-user environment.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 11 May 2025.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
JMAP ([RFC8620] — JSON Meta Application Protocol) is a generic protocol for synchronizing data, such as mail, calendars or contacts, between a client and a server. It is optimized for mobile and web environments, and aims to provide a consistent interface to different data types.¶
This specification defines a data model for synchronizing calendar data between a client and a server using JMAP. The data model is designed to allow a server to provide consistent access to the same data via CalDAV [RFC4791] as well as JMAP, however the functionality offered over the two protocols may differ. Unlike CalDAV, this specification does not define access to tasks or journal entries (VTODO or VJOURNAL iCalendar components in CalDAV).¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Type signatures, examples, and property descriptions in this document follow the conventions established in Section 1.1 of [RFC8620].¶
The Id data type defined in Section 1.2 of [RFC8620] is used in this document. So too are the UnsignedInt, UTCDateTime, LocalDateTime, Duration, and TimeZoneId data types defined in Sections 1.4.3, 1.4.4, 1.4.5, 1.4.6, and 1.4.8 of [RFC8984] respectively.¶
The same terminology is used in this document as in the core JMAP specification, see Section 1.6 of [RFC8620].¶
The terms ParticipantIdentity, Calendar, CalendarEvent, and CalendarEventNotification (with these specific capitalizations) are used to refer to the data types defined in this document and instances of those data types.¶
An Account (see Section 1.6.2 of [RFC8620]) with support for the calendar data model contains zero or more Calendar objects, which is a named collection of CalendarEvents. Calendars can also provide defaults, such as alerts and a color to apply to events in the calendar. Clients commonly let users toggle visibility of events belonging to a particular calendar on/off. Servers may allow an event to belong to multiple Calendars within an account.¶
A CalendarEvent is a representation of an event or recurring series of events in JSCalendar Event [RFC8984] format. Simple clients may ask the server to expand recurrences for them within a specific time period, and optionally convert times into UTC so they do not have to handle time zone conversion. More full-featured clients will want to access the full event information and handle recurrence expansion and time zone conversion locally.¶
CalendarEventNotification objects keep track of the history of changes made to a calendar by other users, allowing calendar clients to notify the user of changes to their schedule.¶
The ParticipantIdentity data type represents the identities of the current user within an Account, which determines which events the user is a participant of and possibly their permissions related to that event.¶
In servers with support for JMAP Sharing [I-D.ietf-jmap-sharing], data may be shared with other users. Sharing permissions are managed per calendar. For example, an individual may have separate calendars for personal and work activities, with both contributing to their free-busy availability, but only the work calendar shared in its entirety with colleagues. Principals (see Section 2 of [I-D.ietf-jmap-sharing]) may also represent schedulable entities, such as a meeting room.¶
Users can normally subscribe to any calendar to which they have access. This indicates the user wants this calendar to appear in their regular list of calendars. The separate "isVisible" property stores whether the user would currently like to view the events in a subscribed calendar.¶
Each CalendarEvent has a "uid" property (Section 4.1.2 of [RFC8984]), which is a globally unique identifier that identifies the same event in different Accounts, or different instances of the same recurring event within an Account.¶
An Account MUST NOT contain more than one CalendarEvent with the same uid unless all of the CalendarEvent objects have distinct, non-null values for their "recurrenceId" property. (This situation occurs if the Principal is added to one or more specific instances of a recurring event without being invited to the whole series.)¶
Each CalendarEvent also has an id, which is scoped to the JMAP Account and used for referencing it in JMAP methods. There is no necessary link between the uid and the CalendarEvent's id. CalendarEvents with the same uid in different Accounts may have different ids.¶
The capabilities object is returned as part of the JMAP Session object; see Section 2 of [RFC8620]. This document defines three additional capability URIs.¶
This represents support for the Calendar, CalendarEvent, CalendarEventNotification, and ParticipantIdentity data types and associated API methods, except for "CalendarEvent/parse". The value of this property in the JMAP Session "capabilities" property is an empty object.¶
The value of this property in an account's "accountCapabilities" property is an object that MUST contain the following information on server capabilities and permissions for that account:¶
UnsignedInt|null
UTCDateTime
UTCDateTime
Duration
UnsignedInt|null
Boolean
Represents support for the "Principal/getAvailability" method. Any account with this capability MUST also have the urn:ietf:params:jmap:principals
capability (see Section 1.5.1 of [I-D.ietf-jmap-sharing]).¶
The value of this property in the JMAP Session "capabilities" property is an empty object.¶
The value of this property in an account's "accountCapabilities" property is an object that MUST contain the following information on server capabilities and permissions for that account:¶
Duration
This represents support for the CalendarEvent/parse method (see Section 5.12). The value of this property is an empty object in both the JMAP session "capabilities" property and an account's "accountCapabilities" property.¶
For systems that also support JMAP Sharing [I-D.ietf-jmap-sharing], the urn:ietf:params:jmap:calendars
capability is used to indicate that this Principal may be used with calendaring. A new method is defined to allow users to query availability when scheduling events.¶
A "urn:ietf:params:jmap:calendars" property is added to the Principal "capabilities" object, the value of which is an object with the following properties:¶
Id|null
urn:ietf:params:jmap:calendars
capability that contains the calendar data for this Principal, or null if either (a) there is none (e.g. the Principal is a group just used for permissions management), or (b) the user does not have access to any data in the account (with the exception of free/busy, which is governed by the "mayGetAvailability" property). The corresponding Account object can be found in the Principal's "accounts" property, as per Section 2 of [I-D.ietf-jmap-sharing].¶
Boolean
Boolean
String
String[String]|null
This method calculates the availability of the Principal for scheduling within a requested time period. It takes the following arguments:¶
Id
Id
UTCDateTime
UTCDateTime
Boolean
String[]|null
The server will first find all relevant events, expanding any recurring events. Relevant events are ones where all of the following is true:¶
If an event is in more than one calendar, it is relevant if all of the above are true for any one calendar that it is in.¶
The server then generates a BusyPeriod object for each of these events. A BusyPeriod object has the following properties:¶
UTCDateTime
UTCDateTime
String
(optional, default "unavailable")This MUST be one of:¶
"confirmed"
— The event status is "confirmed" and the Principal's "participationStatus" is "attending".¶
"tentative"
— The event status is "tentative" or the Principal's "participationStatus" is "tentative".¶
"unavailable"
— The Principal is not available for scheduling at this time for any other reason.¶
JSCalendar Event|null
The JSCalendar Event representation of the event, or null if any of the following are true:¶
If an "eventProperties" argument was given, any properties in the JSCalendar Event that are not in the eventProperties list are removed from the returned representation.¶
The server MAY also generate BusyPeriod objects based on other information it has about the Principal's availability, such as office hours.¶
Finally, the server MUST merge and split BusyPeriod objects where the "event" property is null, such that none of them overlap and either there is a gap in time between any two objects (the utcEnd of one does not equal the utcStart of another) or those objects have a different "busyStatus" property. If there are overlapping BusyPeriod time ranges with different "busyStatus" properties the server MUST choose the value in the following order: confirmed > unavailable > tentative.¶
The response has the following argument:¶
BusyPeriod[]
The following additional errors may be returned instead of the "Principal/getAvailability" response:¶
A ParticipantIdentity stores information about a URI that represents the user within that account in an event's participants. It has the following properties:¶
Id
(immutable; server-set)String
(default: "")String
String[String]
Represents methods by which the participant may receive invitations and updates to an event.¶
The keys in the property value are the available methods and MUST only contain ASCII alphanumeric characters (A-Za-z0-9). The value is a URI for the method specified in the key.¶
Boolean
(server-set)This SHOULD be true for exactly one participant identity in any account, and MUST NOT be true for more than one participant identity within an account. The default identity should be used by clients whenever they need to choose an identity for the user within this account, and they do not have any other information on which to make a choice. For example, if creating a scheduled event in this account, the default identity may be automatically added as an owner. (But the client may ignore this if, for example, it has its own feature to allow users to choose which identity to use based on the invitees.)¶
If no participant identities have "isDefault" set, users with multiple clients may experience different default choices in each client, which can be confusing or lead to the wrong identity being used by accident.¶
A participant in an event corresponds to a ParticipantIdentity if the "calendarAddress" property of the participant is equivalent to the "calendarAddress" property of the identity after syntax-based normalisation, as per Section 6.2.2 of [RFC3986].¶
The following JMAP methods are supported.¶
This is a standard "/get" method as described in Section 5.1 of [RFC8620]. The "ids" argument may be null to fetch all at once.¶
This is a standard "/changes" method as described in Section 5.2 of [RFC8620].¶
This is a standard "/set" method as described in Section 5.3 of [RFC8620], but with the following additional request argument:¶
Id|null
If the id is not found, or the change is not permitted by the server for policy reasons, it MUST be ignored and the currently default ParticipantIdentity (if any) will remain as such. No error is returned to the client in this case.¶
As per Section 5.3 of [RFC8620], if the default is successfully changed, any changed objects MUST be reported in either the "created" or "updated" argument in the response as appropriate, with the server-set value included.¶
The server MAY restrict the URI values the user may claim, for example only allowing mailto:
URIs with email addresses that belong to the user. A standard forbidden
error is returned to reject non-permissible changes.¶
A Calendar is a named collection of events. All events are associated with at least one calendar.¶
A Calendar object has the following properties:¶
Id
(immutable; server-set)String
String|null
(default: null)String|null
(default: null)A color to be used when displaying events associated with the calendar.¶
If not null, the value MUST be a case-insensitive color name taken from the set of names defined in Section 4.3 of CSS Color Module Level 3 [COLORS], or an RGB value in hexadecimal notation, as defined in Section 4.2.1 of CSS Color Module Level 3.¶
The color SHOULD have sufficient contrast when used as text on a white background, unless the user explicitly chooses otherwise. The Web Content Accessibility Guidelines [WCAG] recommend at least a 4.5:1 contrast ratio for readability.¶
UnsignedInt
(default: 0)Defines the sort order of calendars when presented in the client's UI, so it is consistent between devices. The number MUST be an integer in the range 0 <= sortOrder < 231.¶
A calendar with a lower order is to be displayed before a calendar with a higher order in any list of calendars in the client's UI. Calendars with equal order should be sorted in alphabetical order by name. The sorting should take into account locale-specific character order convention.¶
Boolean
True if the user has indicated they wish to see this Calendar in their client. This SHOULD default to false for Calendars in shared accounts the user has access to and true for any new Calendars created by the user themself.¶
If false, the calendar SHOULD only be displayed when the user explicitly requests it or to offer it for the user to subscribe to. For example, a company may have a large number of shared calendars which all employees have permission to access, but the user would only subscribe to the ones they care about and want to be able to have normally accessible.¶
Boolean
(default: true)Boolean
(server-set)String
This determines which events in this calendar will be used as part of availability calculation. The value MUST be one of:¶
"all"
— all events are considered.¶
"attending"
— events the user is a confirmed or tentative participant of are considered.¶
"none"
— all events are ignored (but may be considered if also in another calendar).¶
This should default to "all" for the calendars in the user's own account, and "none" for calendars shared with the user.¶
Id[Alert]|null
A map of alert ids to Alert objects (see Section 4.5.2 of [RFC8984]) to apply for events where "showWithoutTime" is false and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other calendars; a UUID [RFC9562] is recommended.¶
If omitted on creation, the default is server dependent. For example, servers may choose to always default to null, or may copy the alerts from the default calendar.¶
Id[Alert]|null
A map of alert ids to Alert objects (see Section 4.5.2 of [RFC8984]) to apply for events where "showWithoutTime" is true (commonly referred to as "all day" events) and "useDefaultAlerts" is true. Ids MUST be unique across all default alerts in the account, including those in other calendars; a UUID [RFC9562] is recommended.¶
If omitted on creation, the default is server dependent. For example, servers may choose to always default to null, or may copy the alerts from the default calendar.¶
TimeZoneId|null
(default: null)Id[CalendarRights]|null
(default: null)This is a map configuring who the calendar is shared with, or null if it is not shared with anyone. Each key in the map is the id of a Principal with whom the calendar is shared. The value for each key is the set of access rights that Principal has for the calendar. The account id for the Principals may be found in the urn:ietf:params:jmap:principals:owner
capability of the Account to which the calendar belongs.¶
The Principal to which this calendar belongs MUST NOT be in the map.¶
The property may only be modified if the user has the mayShare right.¶
CalendarRights
(server-set)The set of access rights the user has in relation to this Calendar. If any event is in multiple calendars, the user has the following rights:¶
A CalendarRights object has the following properties:¶
Boolean
Boolean
Boolean
Boolean
Boolean
The user may modify per-user properties (see Section 5.3) on all events in the calendar, even if they would not otherwise have permission to modify that event. These properties MUST all be stored per-user, and changes do not affect any other user of the calendar.¶
The user may also modify these properties on a per-occurrence basis for recurring events (updating the "recurrenceOverrides" property of the event to do so).¶
Boolean
The user may modify the following properties of any Participant object that corresponds to one of the user's ParticipantIdentity objects in the account, even if they would not otherwise have permission to modify that event:¶
If the event has its "mayInviteSelf" property set to true (see Section 5.1.2), then the user may also add a new Participant to the event with calendarAddress/sendTo properties that are the same as the calendarAddress/sendTo properties of one of the user's ParticipantIdentity objects in the account. The "roles" property of the participant MUST only contain "attendee".¶
If the event has its "mayInviteOthers" property set to true (see Section 5.1.3) and there is an existing Participant in the event corresponding to one of the user's ParticipantIdentity objects in the account, then the user may also add new participants. The "roles" property of any new participant MUST only contain "attendee".¶
The user may also do all of the above on a per-occurrence basis for recurring events (updating the "recurrenceOverrides" property of the event to do so).¶
Boolean
Boolean
The user is an owner for an event if the CalendarEvent object has a "participants" property, and one of the Participant objects both:¶
An event has no owner if its "participants" property is null or omitted, or if none of the Participant objects have the "owner" role.¶
This is a standard "/get" method as described in Section 5.1 of [RFC8620]. The "ids" argument may be null to fetch all at once.¶
If mayReadFreeBusy is the only permission the user has, the calendar MUST NOT be returned in "Calendar/get" and "Calendar/query"; it must behave as though it did not exist. The data is just used as part of "Principal/getAvailability".¶
This is a standard "/changes" method as described in Section 5.2 of [RFC8620].¶
This is a standard "/set" method as described in Section 5.3 of [RFC8620] but with the following additional request arguments:¶
Boolean
(default: false)calendarHasEvent
SetError. If true, any CalendarEvents that were in the Calendar will be removed from it, and if in no other Calendars they will be destroyed. This MUST NOT send scheduling messages to participants. It MAY create CalendarEventNotification objects, if deemed likely to be helpful to the user. In the case of a calendar with a large number of events, the large number of notifications resulting from the single deletion is unlikely to be useful to the user, and the server MAY choose to omit creating them. In systems supporting JMAP Sharing, a single ShareNotification (as defined in Section 3 of [I-D.ietf-jmap-sharing]) MUST be created for each Principal the calendar was previously shared with, to inform them they no longer have access to the calendar.¶
Id|null
If an id is given, and all creates, updates and destroys (if any) succeed without error, the server will try to set this calendar as the default. (For references to Calendar creations, this is equivalent to a creation-reference, so the id will be the creation id prefixed with a "#".)¶
If the id is not found, or the change is not permitted by the server for policy reasons, it MUST be ignored and the currently default calendar (if any) will remain as such. No error is returned to the client in this case.¶
As per Section 5.3 of [RFC8620], if the default is successfully changed, any changed objects MUST be reported in either the "created" or "updated" argument in the response as appropriate, with the server-set value included.¶
The "shareWith" property may only be set by users that have the mayShare right.
When modifying the "shareWith" property, the user cannot give a right to a Principal if the Principal did not already have that right and the user making the change also does not have that right. Any attempt to do so must be rejected with a forbidden
SetError.¶
Users can subscribe or unsubscribe to a calendar by setting the "isSubscribed" property. The server MAY forbid users from subscribing to certain calendars even though they have permission to see them, rejecting the update with a forbidden
SetError.¶
The following properties may be set by anyone who is subscribed to the calendar and are always stored per-user:¶
The "name", "color", and "timeZone" properties are initially inherited from the owner's copy of the calendar, but if set by a user with whom the calendar is shared, they then get their own copy of the property. This does not change the value for any other users. If the value of the property in the owner's calendar changes after this, it does not overwrite any user's custom value.¶
The "sortOrder", "isVisible", "includeInAvailability", "defaultAlertsWithTime", and "defaultAlertsWithoutTime" properties are initally the default value for each user with whom the calendar is shared; they are not inherited from the owner.¶
The following extra SetError type is defined:¶
For "destroy":¶
A CalendarEvent object contains information about an event, or recurring series of events, that takes place at a particular time. It is a JSCalendar Event object, as defined in [RFC8984], with the following additional properties:¶
Id
(immutable; server-set)Id|null
(immutable; server-set)Id[Boolean]
Boolean
(default: false)Boolean
(server-set)Is this the authoritative source for this event (i.e., does it control scheduling for this event; the event has not been added as a result of an invitation from another calendar system)? This is true if, and only if:¶
UTCDateTime
For simple clients that do not implement time zone support. Clients should only use this if also asking the server to expand recurrences, as you cannot accurately expand a recurrence without the original time zone.¶
This property is calculated at fetch time by the server. Time zones are political and they can and do change at any time. Fetching exactly the same property again may return a different result if the time zone data has been updated on the server. Time zone data changes are not considered "updates" to the event.¶
If set, the server will convert the UTC date to the event's current time zone and store the local time.¶
This property is not included in "CalendarEvent/get" responses by default and must be requested explicitly.¶
Floating events (events without a time zone) will be interpreted as per the time zone given as a "CalendarEvent/get" argument.¶
Note that it is not possible to accurately calculate the expansion of recurrence rules or recurrence overrides with the "utcStart" property rather than the local start time. Even simple recurrences such as "repeat weekly" may cross a daylight-savings boundary and end up at a different UTC time. Clients that wish to use "utcStart" are RECOMMENDED to request the server expand recurrences (see Section 5.10).¶
UTCDateTime
CalendarEvent objects MUST NOT have a "method" property as this is only used when representing iTIP [RFC5546] scheduling messages, not events in a data store.¶
This document defines four new JSCalendar properties for common use.¶
Type: String
¶
Context: Participant¶
This is a URI as defined by [RFC3986] or any other IANA-registered form for a URI. It is the same as the CAL-ADDRESS value of an ATTENDEE or ORGANIZER in iCalendar ([RFC5545]) — it globally identifies a particular participant, even across different events.¶
Type: Boolean
(default: false)¶
Context: Event, Task¶
If true, anyone may add themselves to the event as a participant with the "attendee" role. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.¶
Type: Boolean
(default: false)¶
Context: Event, Task¶
If true, any current participant with the "attendee" role may add new participants with the "attendee" role to the event. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.¶
Type: Boolean
(default: false)¶
Context: Event, Task¶
If true, only the owners of the event may see the full set of participants. Other users with access to the event may only see the owners and themselves. This property MUST NOT be altered in the recurrenceOverrides; it may only be set on the base object.¶
The Link object, as defined in Section 4.2.7 of [RFC8984], with a "rel" property equal to "enclosure" is used to represent attachments. Instead of mandating an "href" property, clients may set a "blobId" property instead to reference a blob of binary data in the account, as per Section 6 of [RFC8620].¶
The server MUST translate this to an embedded data:
URL [RFC2397] when sending the event to a system that cannot access the blob. Servers that support CalDAV access to the same data are recommended to expose these files as managed attachments [RFC8607].¶
In shared calendars, any top-level property registered in the IANA registry as "Is Per-User: yes" (see Section 10.8) MUST be stored per-user. This includes:¶
If the user modifies any such properties on a per-occurrence basis for recurring events then again, these MUST also be stored per-user. Sharees initially receive the default value for each of these properties, not whatever value another user may have set.¶
When writing only per-user properties, the "updated" property MUST also be stored just for that user if set. When fetching the "updated" property, the value to return is whichever is later of the per-user updated time or the updated time of the base event.¶
Events may recur, in which case they represent multiple occurrences or instances. The data store will either contain a single base event, containing a recurrence rule and/or recurrence overrides; or, a set of individual instances (when invited to specific occurrences only).¶
The client may ask the server to expand recurrences within a specific time range in "CalendarEvent/query". This will generate synthetic ids representing individual instances in the requested time range. The client can fetch and update the objects using these ids and the server will make the appropriate changes to the base event. Synthetic ids do not appear in "CalendarEvent/changes" responses; only the ids of events as actually stored on the server.¶
If the user is invited to specific instances then later added to the base event, "CalendarEvent/changes" will show the ids of all the individual instances being destroyed and the id for the base event being created.¶
When editing a recurring event, you can either update the base event (affecting all instances unless overridden) or update an override for a specific occurrence. To update all occurrences from a specific point onwards, there are therefore two options: split the event, or update the base event and override all occurrences before the split point back to their original values.¶
If the event is not scheduled (has no participants), the simplest thing to do is to duplicate the event, modifying the recurrence rules of the original so it finishes before the split point, and the duplicate so it starts at the split point. As per JSCalendar Section 4.1.3 of [RFC8984], a "next" and "first" relation MUST be set on the new objects respectively.¶
Splitting an event however is problematic in the case of a scheduled event, because the participants will see it as two separate changes, and may not understand the connection between the two.¶
For scheduled events, a better approach is to avoid splitting and instead update the base event with the new property value for "this and future", then create overrides for all occurrences before the split point to restore the property to its previous value. Indeed, this may be the only option the user has permission to do if not an owner of the event.¶
Clients may choose to skip creating the overrides if the old data is not important, for example if the "alerts" property is being updated, it is probably not important to create overrides for events in the past with the alerts that have already fired.¶
This is a standard "/get" method as described in Section 5.1 of [RFC8620], with four extra arguments:¶
UTCDateTime|null
UTCDateTime|null
Boolean
(default: false)TimeZoneId
(default "Etc/UTC")A CalendarEvent object is a JSCalendar Event object so may have arbitrary properties. If the client makes a "CalendarEvent/get" call with a null or omitted "properties" argument, all properties defined on the JSCalendar Event object in the store are returned, along with the "id", "calendarIds", "isDraft", and "isOrigin" properties. The "utcStart" and "utcEnd" computed properties are only returned if explicitly requested. If either are requested, the "recurrenceOverrides" property MUST NOT be requested (recurrence overrides cannot be interpreted accurately with just the UTC times).¶
If specific properties are requested from the JSCalendar Event and the property is not present on the object in the server's store, the server MUST return the default value if known for that property.¶
A requested id may represent a server-expanded single instance of a recurring event if the client asked the server to expand recurrences in "CalendarEvent/query". In such a case, the server will resolve any overrides and set the appropriate "start" and "recurrenceId" properties on the CalendarEvent object returned to the client. The "recurrenceRules" and "recurrenceOverrides" properties MUST be returned as null if requested for such an event.¶
An event with the same uid/recurrenceId may appear in different accounts. Clients may coalesce the view of such events, but must be aware that the data may be different in the different accounts due to per-user properties, difference in permissions, etc.¶
The "hideAttendees" property of a JSCalendar Event object allows the event owner(s) to hide the full set of participants when sharing the event. If this is true, when a non-owner fetches the event the server MUST only return participants with the "owner" role or corresponding to the user's participant identities.¶
The "privacy" property of a JSCalendar Event object allows the Principal that owns the calendar to override how the event is exposed to those with whom the calendar is shared. If set to "private", then when another user fetches the event the server MUST only return properties that are:¶
If "privacy" is set to "secret", the server MUST behave as though the event does not exist for all users other than the Principal that owns the calendar.¶
This is a standard "/changes" method as described in Section 5.2 of [RFC8620].¶
Synthetic ids generated by the server expanding recurrences in "CalendarEvent/query" do not appear in "CalendarEvent/changes" responses; only the ids of events as actually stored on the server.¶
This is a standard "/set" method as described in Section 5.3 of [RFC8620], with the following extra argument:¶
Boolean
(default: false)If true then any changes to scheduled events will be sent to all the participants (if the server is the origin of the event) or back to the origin (otherwise). If false, the changes only affect this account and no scheduling messages will be sent.¶
The server may send the scheduling message via any of the methods defined on the "sendTo" property of a participant (if the server is the origin) or the "replyTo" property of the event (otherwise) that it supports. If no supported methods are available for any of the recipients, the server MUST reject the change with a noSupportedScheduleMethods
SetError.¶
At time of writing, the most common interoperable protocol for sending scheduling methods between participants on different servers is iMIP [RFC5546]. A future document will provide recommendations of what iMIP messages to send based on the change for best compatibility.¶
An id may represent a server-expanded single instance of a recurring event if the client asked the server to expand recurrences in "CalendarEvent/query". When the synthetic id for such an instance is given, the server MUST process an update as an update to the recurrence override for that instance on the base event, and a destroy as removing just that instance.¶
Clients MUST NOT send an update/destroy to both the base event and a synthetic instance in a single "/set" request; the result of this is undefined. Note however, a client may replace a series of explicit instances (each with the same uid but a different "recurrenceId" property) with the base event (same uid, no recurrenceId) in a single "/set" call. (So the "/set" will destroy the existing instances and create the new base event.) This will happen when someone is initially invited to a specific instance or instances of a recurring event, then later invited to the whole series.¶
If a property is set to null in a create/update, this is equivalent to omitting/removing the property from the JSCalendar Event object.¶
Servers MUST enforce the user's permissions as returned in the "myRights" property of the Calendar objects and reject changes with a forbidden
SetError if not allowed.¶
The "privacy" property of a JSCalendar Event object allows the Principal that owns the calendar to override how the event is exposed to those with whom the calendar is shared. If this is set to "private", the event may only be destroyed or updated by the owner of the calendar it is in. Any attempt by another user to modify such an event MUST be rejected with a forbidden
SetError (even if only modifying per-user properties). If set to "secret", the server MUST behave as though the event does not exist for all users other than the Principal that owns the calendar.¶
The "privacy" property MUST NOT be set to anything other than "public" (the default) for events in a calendar that does not belong to the user (e.g. a shared team calendar, or a calendar shared by another user). The server MUST reject this with an invalidProperties
SetError.¶
If omitted on create, the server MUST set the following properties:¶
@type
MUST be set to "Event"¶
uid
MUST be set to a new globally unique identifier, such as a UUID.¶
created
MUST be set to the current date-time.¶
If (and only if) the server is the origin of the event (i.e., the event's "isOrigin" property is true), the "updated" property MUST be set to the current time by the server whenever an event is created or updated. If the client tries to set a value for this property it is not an error, but it MUST be overridden and replaced with the server's time. If the event is being created and the overridden "updated" time is now earlier than a client-supplied "created" time, the "created" time MUST also be overridden to the server's time. If the server is not the origin of the event it MUST NOT automatically set an "updated" time, as this can break correct processing of scheduling messages.¶
Clients MUST NOT allow users to edit anything other than per-user properties when the "isOrigin" property is false, even if the calendar "myRights" allows them to do so. All other properties may be overwritten when a future update arrives to this event from the origin (e.g., via an iTIP REQUEST message). Such updates may be directly applied by the server, or applied at the user's request by a client if it has access to the data through some other means (e.g., the client also has access to the user's email and can parse an iMIP message).¶
When updating an event, if all of:¶
then the server MUST increment the "sequence" value by one.¶
The "method" property MUST NOT be set. Any attempt to do so is rejected with a standard invalidProperties
SetError.¶
If "utcStart" is set, this is translated into a "start" property using the server's current time zone information. It MUST NOT be set in addition to a "start" property and it cannot be set inside "recurrenceOverrides"; this MUST be rejected with an invalidProperties
SetError.¶
Similarly, the "utcEnd" property is translated into a "duration" property if set. It MUST NOT be set in addition to a "duration" property and it cannot be set inside "recurrenceOverrides"; this MUST be rejected with an invalidProperties
SetError.¶
The server does not automatically reset the "partipationStatus" or "expectReply" properties of a Participant when changing other event details. Clients should either be intelligent about whether the change invalidates previous RSVPs, or ask the user whether to reset them.¶
The server MAY enforce that all events have an owner, for example in team calendars. If the user tries to create an event without participants in such a calendar, the server MUST automatically add a participant with the "owner" role corresponding to one of the user's ParticipantIdentities (see Section 3).¶
When creating an event with participants, or adding participants to an event that previously did not have participants, the server MUST set the "replyTo" property of the event if not present. Clients SHOULD NOT set the "replyTo" property for events when the user adds participants; the server is better positioned to add all the methods it supports to receive replies.¶
The following extra SetError type is defined:¶
The JMAP "/set" method allows you to update an object by sending a patch, rather than having to supply the whole object. When doing so, care must be taken if updating a property of a CalendarEvent where the value is itself a PatchObject, e.g. inside "localizations" or "recurrenceOverrides". In particular, you cannot add a property with value null to the CalendarEvent using a direct patch on that property, as this is interpreted instead as a patch to remove the property.¶
This is more easily understood with an example. Suppose you have a CalendarEvent object like so:¶
In this example, Tom is normally going to the weekly meeting but has declined the occurrence on 2025-03-05, which starts an hour later than normal. Now, if Zoe too were to decline that meeting, she could update the event by just sending a patch like so:¶
This patches the "2025-03-05T09:00:00" PatchObject in recurrenceOverrides so that it ends up like this:¶
Now if Tom were to change his mind and remove his declined status override (thus meaning he is attending, as inherited from the top-level event), he might remove his patch from the overrides like so:¶
However, if you instead want to remove Tom from this instance altogether, you could not send this patch:¶
This would mean removing the "participants/dG9tQGZvb2Jhci5xlLmNvbQ" property at path "recurrenceOverrides" -> "2025-03-05T09:00:00" inside the object; but this doesn't exist. We actually want to add this property and make it map to null. The client must instead send the full object that contains the property mapping to null, like so:¶
This is a standard "/copy" method as described in Section 5.4 of [RFC8620].¶
This is a standard "/query" method as described in Section 5.5 of [RFC8620], with two extra arguments:¶
Boolean
(default: false)TimeZoneId
If expandRecurrences is true, a separate id will be returned for each instance of a recurring event that matches the query. This synthetic id is opaque to the client, but uniquely identifies the base event id + recurrence id within the account, allowing the server to resolve these for "/get" and "/set" operations. Otherwise, a single id will be returned for matching recurring events that represents the entire event.¶
There is no necessary correspondence between the ids of different instances of the same expanded event.¶
The following additional error may be returned instead of the "CalendarEvent/query" response:¶
cannotCalculateOccurrences
: The server cannot expand a recurrence required to return the results for this query.¶
A FilterCondition object has the following properties:¶
Id|null
LocalDateTime|null
LocalDateTime|null
String|null
String|null
String|null
String|null
String|null
String|null
String
If expandRecurrences is true, all conditions must match against the same instance of a recurring event for the instance to match. If expandRecurrences is false, all conditions must match, but they may each match any instance of the event.¶
If zero properties are specified on the FilterCondition, the condition MUST always evaluate to true. If multiple properties are specified, ALL must apply for the condition to be true (it is equivalent to splitting the object into one-property conditions and making them all the child of an AND filter operator).¶
The exact semantics for matching String
fields is deliberately not defined to allow for flexibility in indexing implementation, subject to the following:¶
\"
, \'
and \\
to match a literal "
, '
and \
respectively in a phrase.¶
bus
would match "buses" but not "business").¶
This is a standard "/queryChanges" method as described in Section 5.6 of [RFC8620].¶
This method allows the client to parse blobs as iCalendar
files [RFC5545] to get CalendarEvent
objects. This can be used to parse, display, and import information from iCalendar files without having to implement iCalendar parsing in the client. Server support for this is optional, and indicated via the urn:ietf:params:jmap:calendars:parse
capability, as per Section 1.5.3.¶
The following metadata properties on the CalendarEvent objects will be null if requested:¶
The "CalendarEvent/parse" method takes the following arguments:¶
Id
Id[]
String[]
CalendarEvent
object. If omitted, defaults to all the properties.¶
The response object contains the following arguments:¶
Id
Id[CalendarEvent[]]|null
CalendarEvent
objects representations for each successfully parsed blob, or null if none.¶
Id[]|null
Id[]|null
Parsed iCalendars
are to be converted into CalendarEvent
objects following the process defined in the JSCalendar: Converting from and to iCalendar document.¶
Alerts may be specified on events as described in Section 4.5 of [RFC8984].¶
Alerts MUST only be triggered for events in calendars where the user is subscribed.¶
When an alert with an "email" action is triggered, the server MUST send an email to the user to notify them of the event. The content of the email is implementation specific. Clients MUST NOT perform an action for these alerts.¶
When an alert with a "display" action is triggered, clients should display an alert in a platform-appropriate manner to the user to remind them of the event. Clients with a full offline cache of events may choose to calculate when alerts should trigger locally. Alternatively, they can subscribe to push events from the server.¶
If the "useDefaultAlerts" property of an event is true, the alerts are taken from the "defaultAlertsWithTime" or "defaultAlertsWithoutTime" property of all Calendars (see Section 4) the event is in, rather than the "alerts" property of the CalendarEvent.¶
When using default alerts, the "alerts" property of the event is ignored except for the following:¶
To dismiss an alert, clients set the "acknowledged" property of the Alert object to the current date-time. If the alert was a calendar default, it may need to be added to the event at this point in order to acknowledge it. When other clients fetch the updated CalendarEvent they SHOULD automatically dismiss or suppress duplicate alerts (alerts with the same alert id that triggered on or before the "acknowledged" date-time) and alerts that have been removed from the event.¶
Setting the "acknowledged" property MUST NOT create a new recurrence override. For a recurring calendar object, the "acknowledged" property of the parent object MUST be updated, unless the alert is already overridden in the "recurrenceOverrides" property.¶
Users may wish to dismiss an alert temporarily and have it come back after a specific period of time. To do this, clients MUST:¶
AbsoluteTrigger
specifying the date-time when the alert will trigger again. Add a "relatedTo" property to the new alert, setting the "parent" relation to point to the original alert. This MUST NOT create a new recurrence override; it is added to the same "alerts" property that contains the alert that was acknowledged in step 1.¶
When acknowledging a snoozed alert (i.e. one with a parent relatedTo pointing to the original alert), the client should delete the alert rather than setting the "acknowledged" property.¶
Servers that support the urn:ietf:params:jmap:calendars
capability MUST support registering for the pseudo-type "CalendarAlert" in push subscriptions and event source connections, as described in [RFC8620], Sections 7.2 and 7.3.¶
If requested, a CalendarAlert notification will be pushed whenever an alert is triggered for the user. For Event Source connections, this notification is pushed as an event called "calendarAlert".¶
A CalendarAlert object has the following properties:¶
String
Id
Id
String
LocalDateTime|null
String
The CalendarEventNotification data type represents changes made by external entities to events in calendars that the user is subscribed to. Notifications are stored in the same Account as the CalendarEvent that was changed.¶
Notifications are only created by the server; users cannot create them directly. Clients may present the list of notifications to the user and allow them to dismiss them. To dismiss a notification you use a standard "/set" call to destroy it.¶
The server should create a CalendarEventNotification whenever an event is added, updated or destroyed by another user or due to receiving an iTIP [RFC5546] or other scheduling message in a calendar this user is subscribed to.¶
The CalendarEventNotification does not have any per-user data. A single instance may therefore be maintained on the server for all users with whom the calendar is shared. The server need only keep track of which users have yet to destroy the notification.¶
The server MAY limit the maximum number of notifications it will store for a user. When the limit is reached, any new notification will cause the previously oldest notification to be automatically deleted.¶
The server MAY coalesce events if appropriate, or remove events that it deems are no longer relevant or after a certain period of time. The server SHOULD automatically destroy a notification about an event if the user updates or destroys that event (e.g. if the user sends an RSVP for the event).¶
The CalendarEventNotification object has the following properties:¶
Id
UTCDateTime
Person
Who made the change. The Person object has the following properties:¶
String
String|null
Id|null
String|null
String|null
String
This MUST be one of:¶
Id
Boolean
(created/updated only)JSCalendar Event
PatchObject
(updated only)If the change only affects a single instance of a recurring event, the server MAY set the event and eventPatch properties for just that instance; the calendarEventId MUST still be for the base event.¶
This is a standard "/get" method as described in Section 5.1 of [RFC8620].¶
This is a standard "/changes" method as described in Section 5.2 of [RFC8620].¶
This is a standard "/set" method as described in Section 5.3 of [RFC8620].¶
Only destroy is supported; any attempt to create/update MUST be rejected with a
forbidden
SetError.¶
This is a standard "/query" method as described in Section 5.5 of [RFC8620].¶
A FilterCondition object has the following properties:¶
UTCDateTime|null
UTCDateTime|null
String
Id[]|null
This is a standard "/queryChanges" method as described in Section 5.6 of [RFC8620].¶
For brevity, in the following examples only the "methodCalls" property of the Request object, and the "methodResponses" property of the Response object is shown.¶
A user has authenticated and the client has fetched the JMAP Session object. It finds a single Account with the urn:ietf:params:jmap:calendars
capability, with id "a0x9", and wants to display all the calendar information for January 2023 in the Australia/Melbourne time zone. It might make the following request:¶
The server might respond with something like:¶
The client now has everything it needs to display that month in full.¶
Suppose the user asks the client to create a new event. The client should default to adding it to the "Work" calendar, as this is the default calendar for the user, unless it has information to make a more informed decision. (e.g. The client may have a feature to automatically choose the calendar based on the time of day, and the user indicates the event is at 7pm, so it knows to default to "Private".)¶
As the event has participants, the server sets a "replyTo" property. This server uses a special email address for receiving iMIP RSVPs ([RFC5546]) rather than just receiving them at the owner's regular email address, and also provides a web page for people that don't have calendar clients supporting iMIP. The response may look something like this:¶
The client is connected to the event source and receives a push:¶
Not finding this event in its local cache, the client fetches the information for this event that it needs to show the alert by making the following request:¶
In response it receives:¶
The client displays an alert in a platform-appropriate manner. Presuming the user here is in the Australia/Melbourne time zone, this might look something like:¶
The user snoozes the notification for 30 minutes. The client dismisses the current notification and sends an update to the event to the server:¶
Any other connected client will receive a push, sync the change and dismiss any duplicate alert. After the snooze time has elapsed, the new alert will trigger.¶
The client tries to change the default calendar from "Work" to "Private" (and makes no other change):¶
The server allows the change, returning the following response:¶
The client makes a request to parse the calendar event from a blob id representing an icalendar file:¶
The server responds:¶
If the blob id had not been found, the server would have responded:¶
If the blob id had been found but was not parsable, the server would have responded:¶
All security considerations of JMAP [RFC8620] and JSCalendar [RFC8984] apply to this specification. Additional considerations specific to the data types and functionality introduced by this document are described in the following subsections.¶
Calendars often contain the precise movements, activities, and contacts of people; all intensely private data. Privacy leaks can have real world consequences, and calendar servers and clients MUST be mindful of the need to keep all data secure.¶
Servers MUST enforce the ACLs set on calendars to ensure only authorised data is shared. The additional restrictions specified by the "privacy" property of a JSCalendar Event object (see Section 4.4.3 of [RFC8984]) MUST also be enforced.¶
Users may have multiple Participant Identities that they use for areas of their life kept private from one another. Using one identity with an event MUST NOT leak the existence of any other identity. For example, sending an RSVP from identity worklife@example.com MUST NOT reveal anything about another identity present in the account such as privatelife@example.org.¶
Severs SHOULD enforce that invitations sent to external systems are only transmitted via secure encrypted and signed connections to protect against eavesdropping and modification of data.¶
When receiving events and updates from external systems, it can be hard to verify that the identity of the author is who they claim to be. When receiving events via email, DKIM [RFC6376] and S/MIME [RFC8551] are two mechanisms that may be used to verify certain properties about the email data, which can be correlated with the event information.¶
There are many ways in which a calendar user can make a request liable to cause a calendar server to spend an inordinate amount of processing time. Care must be taken to limit resources allocated to any one user to ensure the system does not become unresponsive. The following subsections list particularly hazardous areas.¶
Recurrence rules can be crafted to occur as frequently as every second. Servers MUST be careful to not allow resources to be exhausted when expanding, and limit the number of expansions they will create. Equally, rules can be generated that never create any occurrences at all. Servers MUST be careful to limit the work spent iterating in search of the next occurrence.¶
An alert firing for an event can cause a notification to be pushed to the user's devices, or to send them an email. Servers MUST rate limit the number of alerts sent for any one user. The combination of recurring events with multiple alerts can in particular define unreasonably frequent alerts, leading to denial of service for either the server processing them or the user's devices receiving them.¶
Similarly, clients generating alerts from the data on device must take the same precautions.¶
The "email" alert type (see Section 4.5.2 of [RFC8984]) causes an email to be sent when triggered. Clients MUST ignore this alert type; the email is sent only by the calendar server. There is no mechanism in JSCalendar to specify a particular email address: the server MUST only allow alerts to be sent to an address it has verified as belonging to the user to avoid this being used as a spamming vector.¶
Since most events are likely to start on the hour mark, a large spike of activity is often seen at these times, with particularly large spikes at certain common times in the time zone of the server's user base. In particular, a large number of alerts (across different users and events) will be triggered at the same time. Servers may mitigate this somewhat by adding jitter to the triggering of the alerts; it is RECOMMENDED to fire them slightly early rather than slightly late if needed to spread load.¶
Invitations received from an untrusted source may be spam. If this is added to the user's calendar automatically it can be very obtrusive, especially if it is a recurring event that now appears every day. It could also be used to attempt to phish the user, or cause them to physically go to a location included in the event. Incoming invitations to events should be subject to spam scanning, and suspicious events should not be added to the calendar automatically.¶
Servers should strip any alerts on invitations when adding to the user's calendar; the "useDefaultAlerts" property should be set instead to apply the user's preferences.¶
Similarly, a malicious user may use a calendar system to send spam by inviting people to an event. Outbound scheduling messages should be subject to all the same controls used on outbound email systems, and rate limited as appropriate. A rate limit on the number of distinct recipients as well as overall messages is recommended.¶
IANA will register the "calendars" JMAP Capability as follows:¶
IANA will register the "principals:availability" JMAP Capability as follows:¶
IANA will register "Calendar" in the "JMAP Data Types" registry as follows:¶
IANA will register "CalendarEvent" in the "JMAP Data Types" registry as follows:¶
IANA will register "CalendarEventNotification" in the "JMAP Data Types" registry as follows:¶
IANA will register "ParticipantIdentity" in the "JMAP Data Types" registry as follows:¶
The following subsections register some new error codes in the "JMAP Error Codes" registry, as defined in [RFC8620].¶
IANA will update the "JSCalendar Properties" registry, originally created in Section 8.2 of [RFC8984], to add a new column called "Is Per-User". The value in this column for each entry MUST be either "yes" or "no", indicating whether each user with whom the object is shared should be able to set their own value for this property without affecting the value for other users.¶
An additional field is added to the template:¶
Is Per-User¶
IANA will register the following additional properties in the JSCalendar Properties Registry.¶