CalendarSettings
Calendar preferences of an account, such as the working hours published in free/busy answers and as the CalDAV calendar availability.
This object can be configured from the WebUI under Account › Calendars › Settings
Fields
Section titled “Fields”workingHours
Section titled “workingHours”Type:
WorkingHours· default:{}Weekly working hours; time outside them is shown as unavailable in free/busy answers
JMAP API
Section titled “JMAP API”The CalendarSettings singleton is available via the urn:stalwart:jmap capability.
x:CalendarSettings/get
Section titled “x:CalendarSettings/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysCalendarSettingsGet permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:CalendarSettings/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:CalendarSettings/set
Section titled “x:CalendarSettings/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysCalendarSettingsUpdate permission.
curl -X POST https://mail.example.com/jmap/ \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:CalendarSettings/set", { "update": { "singleton": { "workingHours": {} } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get CalendarSettingsUpdate
Section titled “Update”stalwart-cli update CalendarSettings --field workingHours='{}'Nested types
Section titled “Nested types”WorkingHours
Section titled “WorkingHours”Weekly working hours of an account, published in free/busy answers and as the CalDAV calendar availability.
enable
Section titled “enable”Type:
Boolean· default:falseWhether the time outside the working hours is shown as unavailable
timeZone
Section titled “timeZone”Type:
TimeZone?Time zone of the hours below. When empty, the account time zone is used.
Type:
List<WorkingHoursSlot>· max items: 14Recurring weekly working intervals; split days are two entries
WorkingHoursSlot
Section titled “WorkingHoursSlot”A working interval on one or more days of the week.
Type:
Set<Weekday>· min items: 1 · max items: 7Days of the week the interval applies to
Type:
LocalTime· default:"09:00"Start of the interval
Type:
LocalTime· default:"17:00"End of the interval; 24:00 is the end of the day
Weekday
Section titled “Weekday”| Value | Label |
|---|---|
monday | Monday |
tuesday | Tuesday |
wednesday | Wednesday |
thursday | Thursday |
friday | Friday |
saturday | Saturday |
sunday | Sunday |