Update Calendar preferences
const url = 'https://example.com/api/v1/calendar/preferences';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"date_format":"system","default_event_calendar_id":"example","first_day_of_week":"system","hour_height":1,"snap_to_items":true,"snap_to_now":true,"time_format":"system","time_step_minutes":5}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/calendar/preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "date_format": "system", "default_event_calendar_id": "example", "first_day_of_week": "system", "hour_height": 1, "snap_to_items": true, "snap_to_now": true, "time_format": "system", "time_step_minutes": 5 }'Requires a signed-in User. It merges supplied display and drag settings with the saved settings. It returns 400 when a value is invalid or 409 when another update prevents the change. Route: /api/v1/calendar/preferences. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A change to Calendar preferences. Omitted fields keep their stored values, so a change in one Installation does not reset the User’s other choices.
object
Select a default Event calendar. null clears the saved choice;
omission keeps it for partial updates.
Align pointer edits with nearby item edges.
Align pointer edits with the current-time line.
Grid interval: 5, 10, 15 or 30 minutes.
Responses
Section titled “Responses”Calendar preferences that follow the User to every Installation.
object
Numeric date pattern, or system for the Installation’s locale.
Stable ID of the User’s default Event calendar, or None when no
Calendar is connected yet.
Week start, or system for the Installation’s locale.
Week and Day zoom: the height of one hour in CSS pixels, 24 to 160.
Align dragged items with nearby item edges when the pointer is close.
Align dragged items with the current-time line when the pointer is close.
Clock cycle, or system for the Installation’s locale.
Grid interval for pointer and keyboard movement: 5, 10, 15 or 30 minutes.
Example
{ "date_format": "system", "first_day_of_week": "system", "time_format": "system", "time_step_minutes": 5}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}