Events

Returns a list of recurring events, recurring event exceptions, and single events from the specified calendar within a given time frame. This is useful when you want to import, store, and synchronize events from the time frame to your application (for example, to enrich events with custom data or integrate events into your own calendaring solution).

If you want to retrieve a list of all events from a calendar, use the Get all Events endpoint instead.

Limitations

  • Nylas might return multiple instances of a single recurring event if the results are paginated.
  • The number of events Nylas returns might be lower than max_results, even if others match your query parameters.
  • Events are not guaranteed to be sorted by their start time.
  • Nylas does not support metadata for this endpoint.
  • Support for Microsoft Graph is in beta.
get/v3/grants/{grant_id}/events/import

Request

  • Base URL
    https://api.us.nylas.com
  • Auth
    • HTTP bearer
    • or HTTP bearer

Query parameters

limitinteger

Specifies the maximum number of events Nylas returns in a single page of results. The actual number of events Nylas returns might be lower than this limit, even if other events match your query parameters.

page_tokenstring

An identifier that specifies which page of data to return. You can get this value from the next_cursor response field. See Pagination for more information.

calendar_idstring required

Filter for the specified calendar ID.

(Not supported for iCloud) You can use primary to query the user's primary calendar.

For an Agent Account, you can also pass the account's own email address, in any letter case, to query its primary calendar. Any other email address returns a 400 error.

startinteger

Filter for events that start at or after the specified time, in seconds using the Unix timestamp format. For example, if you filter for events that start at 9:00a.m., and the calendar includes an event that runs from 8:30–9:30a.m., Nylas returns that event.

Defaults to the time that you make the request.

The start value cannot be later than end. For iCloud accounts, the difference between start and end can't be greater than one year.

endinteger

Filter for events that end at or before the specified time, in seconds using the Unix timestamp format. For example, if you filter for events that end at 5:00p.m., and the calendar includes an event that runs from 4:30–5:30p.m., Nylas returns that event.

Defaults to one month from the time you make the request.

The end value cannot be earlier than start. For iCloud accounts, the difference between start and end can't be greater than one year.

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.

Response

Events Response

request_idstring

The request ID.

next_cursorstring nullable

A cursor pointing to the next page of results for the request.

Example response

{
  "request_id": "5fa64c92-e840-4357-86b9-2aa364d35b88",
  "next_cursor": "CigKGjRlaDdyNGQydTFqbWJ0bGo5a2QxdWJtdDZnGAEggIDAu7fw7bEYGg8IABIAGPjh2PGEi_0CIAEiBwgCEOqs6i4="
}

Changes

    • info

      added the optional property /// to the response with the status

    • breaking

      the //// response's property type changed from object to array for status

    • warning

      added the new Teams for Business enum value to the //// response property for the response status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      removed subschema #1: Auto-conferencing subschema #2: Google Meet subschema #3: Zoom Meeting subschema #4: Microsoft Teams subschema #5: WebEx subschema #6: GoToMeeting from the /// response property oneOf list for the response status