inboxes > calendar

Updates the calendar's default time zone. Existing events keep their own timezone; only events created later without a timezone use the new default.

Requires the calendar_update permission. To make the update conditional, send the calendar's current etag in If-Match: a stale value returns 412. Without If-Match the update applies to the calendar as it is.

Calendar is available in US production (api.agentmail.to) but not yet in EU production (api.agentmail.eu), which returns 403.

patch/v0/inboxes/{inbox_id}/calendar

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/calendar
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

Headers

If-Matchstring

The calendar's current etag, for example "rv-0". Optional; makes the update conditional; * matches any current version.

Request body

timezonestring required

IANA time zone name, for example America/New_York, Europe/London or UTC. Requests accept any capitalization and IANA aliases such as US/Eastern. The calendar stores and returns the canonical name, which for some zones is an older spelling: Asia/Kolkata is returned as Asia/Calcutta. Abbreviations such as PST and Windows names such as Pacific Standard Time are rejected.

Response

Response with status 200

inbox_idstring required

The ID of the inbox.

timezonestring required

IANA time zone name, for example America/New_York, Europe/London or UTC. Requests accept any capitalization and IANA aliases such as US/Eastern. The calendar stores and returns the canonical name, which for some zones is an older spelling: Asia/Kolkata is returned as Asia/Calcutta. Abbreviations such as PST and Windows names such as Pacific Standard Time are rejected.

event_countinteger required

Number of one-off and recurring events on the calendar. Each recurring event counts once.

created_atstring date-time required

Time at which the calendar was created. The calendar exists from the moment the inbox does, so this is the inbox's creation time.

updated_atstring date-time required

Time at which the calendar was last updated.

etagstring required

The calendar's current version, also sent as the ETag response header. Send it in If-Match to make an update conditional.

Changes