Skip to content
Skip to main content

Events

Events represent scheduled items on a calendar. The Nylas Events API uses the same commands to manage events across providers, and can refer to specific events using the provider's event_id parameter. Events can be public, private, or shared among a group of users. They might include details like participants, locations, and timing, along with other information.

The Events API includes the Send RSVP endpoint, which allows you to send RSVPs directly from your Nylas application, even for participants who might not have access to edit a specific event.

Metadata on events

You can add metadata to new and existing events by including the metadata sub-object in your POST, PUT, or PATCH request. For more information, see the Metadata documentation.

Virtual calendars

Nylas allows you to create virtual calendars for users and resources that might not have calendars on your providers (for example, external contractors or meeting rooms). You can use the Nylas Calendar and Events APIs with the virtual accounts that power virtual calendars, just like you would any other account. Virtual accounts don't provide email or contacts features, so you can't use them with the Email or Contacts APIs.

For more information, see Using virtual calendars.

Events scopes

The table below lists the Events endpoints and which scopes they require. The table shortens the full scope URI for space reasons, so add the prefix for the provider when requesting scopes.

The ☑️ in each column indicates the most restrictive scope you can request for each provider and still use that API. More permissive scopes appear under the minimum option. If you're already using one of the permissive scopes, you don't need to add the more restrictive scope.

Endpoint Google Scopes
https://www.googleapis.com/auth/...
Microsoft Scopes
https://graph.microsoft.com/...
GET /events
GET /events/<EVENT_ID>
/calendar.events.readonly ☑️
/calendar.events
/calendar (Required to use primary keyword when referencing calendars.)
Calendars.Read ☑️
Calendars.ReadWrite
POST /events
PUT /events/<EVENT_ID>
DELETE /events/<EVENT_ID>
POST /events/<EVENT_ID>/send-rsvp
/calendar.events ☑️
/calendar (Required to use primary keyword when referencing calendars.)
Calendars.ReadWrite ☑️

For more information about scopes, see Using scopes to request user data.

Events notifications

You can subscribe to the following notification triggers so Nylas notifies you about changes to your users' event data:

  • event.created
  • event.updated
  • event.deleted

These are separate from the event reminders which you might send to your users. For more information, see the Event webhook notification schemas.

Microsoft event considerations

Microsoft Outlook events are often shared across all calendars in a user's account. If the user creates an event on one of their calendars, you can retrieve it using another calendar ID from their grant.

iCloud query considerations

If you're searching for an event within a certain time range on an iCloud account, the difference between start and end can't be greater than six months. If you include a time range greater than six months, Nylas returns an "Invalid request" error similar to the following example.

"error": {
  "type": "invalid_request_error",
  "message": "The maximum time range for iCloud event queries is 6 months."
}

For more information about searching for events, see Searching with Nylas.

Endpoints

7