- Products
- Solutions
- Developers Go to DevelopersDocumentationTools & resources
- Success Stories
- Pricing
- Why Nylas
Allow users to centralize team and organizational events with full CRUD for secondary calendars for Google and Microsoft.
With Nylas, your users can manage their primary calendars by syncing all of the data into your CRM or app and creating, deleting, or editing existing invites with features like room resources and free/busy. Now, users can apply all of these same controls to their secondary calendars with the added ability to get full CRUD on the secondary calendar itself, not just the events.
Full CRUD on secondary calendars works for all Google and Microsoft calendars and allows you to take the following actions:
POST /calendars – Create and update a new secondary calendar with the following attributes:
DELETE /calendars/id – Delete an existing secondary calendar. Note: if the user tries to delete a calendar that is_primary: true they will see an error message and the primary calendar will not be deleted.
Secondary calendars are incredibly useful for aligning teams. For example, a common use case for secondary calendars within an organization may be a PTO calendar where all employees can input their days off for their teammates and manager to see, making it easy to cross-reference when a colleague is out of the office when preparing to schedule meetings.
This shared calendar helps address the challenge of ensuring there is one source of information, which in turn saves everyone the time of having to check multiple calendars, then individually message people to confirm or follow-up.
Another common use for secondary calendars is when it comes to employee hiring – a multi-layered, complex process that requires input and schedule coordinating from many participants, sometimes across offices and time-zones. In today’s ever-growing remote-world, it’s useful to have a secondary calendar that shows full visibility into scheduled interviews for the week at the right time for each participant.
An interview can involve several employees from different departments meeting with the candidate. Having the interviewee’s schedule on one calendar so that all the interviewers know when their interview begins, and anticipate the process of handing-off the candidate to the next interviewer keeps everything running smoothly and effectively. This results in the best possible experience for both the candidate and for the company’s employees conducting the interviews.
Having the option to programmatically create, read, update, and delete special-purpose secondary calendars makes your application’s calendar experience more flexible and complete.
Please note that you can always use GET /calendars and look at the is_primary field to determine if a calendar is primary or secondary.
curl -X GET 'https://api.nylas.com/calendars' \ -H 'Authorization: Bearer ACCESS_TOKEN' \
Creating a new secondary calendar with Google or Microsoft.
curl -X POST \ "https://api.nylas.com/calendars" \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -d '{ "name":"My New Calendar", "description":"Description of my new calendar.", "location":"Location description", "timezone":"America/Los_Angeles" }'
Example response:
{ "account_id": "eof2wrhqkl7kdwhy9hylpv9o9", "description": "Description of my new calendar.", "id": "8e570s302fdazx9zqwiuk9jqn", "is_primary": false, "job_status_id": "48pp6ijzrxpw9jors9ylnsxnf", "location": "Location description", "name": "My New Calendar", "object": "calendar", "read_only": false, "timezone": "America/Los_Angeles" }
Updating an existing secondary calendar gives you the option to update the name, description, location, or timezone. Please note, this is not available for Microsoft secondary calendars.
curl -X PUT \ "https://api.nylas.com/calendars/{calendar_id}" \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -d '{ "description":"Updating the description my new calendar." }'
Deleting a secondary calendar is done simply by calling this endpoint with the calendar ID.
curl -X DELETE \ "https://api.nylas.com/calendars/{calendar_id}" / -H 'Authorization: Bearer ACCESS_TOKEN' \
An example of a successful deletion response.
{ "job_status_id": "d38mgop88je0agkqrf03sw0sw" }
As organizations grow, it is easy for the complexity and scale to wreak infrastructural havoc as people attempt to coordinate schedules, reference one source of scheduling information, and update that source of information in a consistent and easy way. Now with the availability of full CRUD for secondary calendars with Google and Microsoft, managing this important growth step is simple and straightforward.
In addition to full CRUD for secondary calendars with Google and Microsoft, Nylas provides front-end scheduling tools in Nylas Scheduler: a customizable widget that powers sophisticated automated scheduling tools like instant schedule, round-robin for fairness, round-robin based on first availability, time zone support, and more.
Get started with service accounts today by signing up for a free Nylas developer account.
Tasia is the Director of Product Marketing at Nylas. She's passionate about communications and helping connect the world through APIs. In her free time, she writes and produces music.