Skip to content
Skip to main content
PUT
/v3/grants/{grant_id}/calendars/{calendar_id}

Update a calendar

Updates the specified calendar.

When you make a PUT request, Nylas replaces all data in the nested object with the information included in your request. For more information, see Updating objects.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

calendar_id*string

ID of the calendar to access. You can use primary to refer to the primary calendar associated with a grant. Nylas recommends you URL-encode this field, or you might receive a 404 error if the ID contains special characters (for example, #).

Query parameters

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

Request body

descriptionstring

(Not supported for iCloud or EWS) A brief description of the calendar.

Example: "Junior sports league carpool drivers"
hex_colorstring

(Not supported for iCloud or EWS) The background color of the calendar, in hexadecimal format (for example, #0099EE). When empty, Nylas uses the default background color.

You can set or modify this value using a PUT request only.

Example: "#039BE5"
hex_foreground_colorstring

(Google only) The foreground color of the calendar, in hexadecimal format (for example, #0099EE). When empty, Nylas uses the default foreground color.

You can modify this value using a PUT request only.

Example: "#039BE5"
locationstring

(Not supported for iCloud or EWS) The geographic location of the calendar, as free-form text.

Example: "London, England"
metadataobject

The metadata associated with the object. For more information, see Metadata.

namestring

The name of the calendar.

Microsoft doesn't allow you to update the name of a user's primary calendar.

Example: "My Updated Calendar"
timezonestring

(Google and virtual calendars only) An IANA timezone database formatted string (for example, America/New_York).

Example: "America/Los_Angeles"
notetakerobject

Responses

request_idstring

The request ID.

dataobject

A Calendar object.

PUThttps://api.us.nylas.com/v3/grants/{grant_id}/calendars/{calendar_id}

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

calendar_idrequiredstring

ID of the calendar to access. You can use primary to refer to the primary calendar associated with a grant. Nylas recommends you URL-encode this field, or you might receive a `404` error if the ID contains special characters (for example, #).

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.