Skip to content

Using virtual calendars

Virtual calendars work like any other calendar in Nylas. They also make it easy to include customized scheduling in your project by allowing users to schedule events without needing to connect to a third-party provider, like Google or Microsoft.

You might prefer virtual calendars for your project if…

  • Your users have sensitive information on their personal calendars that they don’t want to expose to complete their task.
  • Your users don’t have accounts on the providers your project supports (for example, external contractors).
  • You want to let users book resources that don’t have accounts on the providers your project supports (for example, meeting rooms).

Nylas’ virtual calendars are linked to virtual accounts within your Nylas application. Unlike normal grants, virtual accounts don’t expire, they don’t generate grant.expired notifications, and you don’t need to define or manage their scopes. Each Nylas application can have as many virtual accounts as necessary, billed at your usual per-grant price. Each virtual account can have up to 10 virtual calendars.

You can only use the Manage Grants, Calendar, and Events endpoints with virtual accounts. They don’t have access to the Email and Contacts APIs.

Virtual accounts are displayed in the Nylas Dashboard as grants. Their provider is always “Virtual calendar”.

The Nylas Dashboard showing a list of grants. The virtual calendar's Provider is listed as Virtual Calendar.

The first virtual calendar that you create for a virtual account becomes the account’s primary calendar. Like third-party calendars, you can reference the virtual calendar in API requests using the primary keyword instead of the calendar_id. You can’t change which virtual calendar is the primary, and you can’t delete the primary calendar.

You can use virtual calendars with Scheduler to book events.

There are two steps to authenticating a virtual account: first, you have to create a virtual calendar connector, then create a virtual account.

To create a virtual calendar connector in the Nylas Dashboard, select Connectors in the left navigation, scroll to the Virtual calendar option, and click the plus symbol beside it.

A close-up of the Nylas Dashboard Connectors page displaying the Virtual Calendar connector entry.

Programmatically, you can create a virtual calendar connector by making a Create Connector request.

Make a BYO Authentication request and set the provider to virtual-calendar.

The settings.email field can be any arbitrary string — it doesn’t need to be formatted as an email address. Nylas uses this value as an ID to manage the virtual account. Because of this, you can’t use the identifier listed in settings.email to authenticate a third-party account with Nylas. We strongly recommend against using an existing email address as the identifier.

To create a virtual calendar, make a Create Calendar request that specifies the grant ID of an existing virtual account.

Nylas doesn’t send email invitations or event reminders to participants on virtual calendar events.

Now that you have both a virtual account and a virtual calendar, you can start creating events. Make a Create Event request that specifies the virtual account’s grant ID and the virtual calendar ID.

You can use the Get Availability endpoint to get availability information for a virtual calendar.

Virtual calendars support calendar.created, event.created, and event.updated notifications.