Skip to navigation

Update Calendar

Beta

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 in private beta in US production (api.agentmail.to). It is unavailable in EU production (api.agentmail.eu). Organizations without access receive a 403.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

inbox_idstringRequired
The ID of the inbox.

Headers

If-MatchstringOptional

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

Request

This endpoint expects an object.
timezonestringRequired

New default time zone for events created without a timezone.

Response

This endpoint returns an object.
inbox_idstring
The ID of the inbox.
timezonestring

Default time zone for events created without a timezone. Defaults to UTC. Changing it does not move existing events.

event_countinteger

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

created_atdatetime
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_atdatetime
Time at which the calendar was last updated.
etagstring

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

Errors

400
Validation Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
412
Precondition Failed Error
413
Payload Too Large Error