Skip to content

Hosted Scheduling Pages

Nylas allows you to host Scheduling Pages under the book.nylas.com subdomain, so you can implement link-based scheduling in your Nylas application. This page explains how to create a Nylas-hosted Scheduling Page and integrate it with your project.

Create a hosted Scheduling Page

When you create a public configuration with a URL slug, Nylas automatically hosts the Scheduling Page at:

Terminal window
https://book.nylas.com/<REGION>/<NYLAS_CLIENT_ID>/<SLUG>
  • <REGION> represents the data center region where your Nylas application is hosted (either us or eu).
  • <NYLAS_CLIENT_ID> is your Nylas application’s client ID, which you can find in the v3 Dashboard.
  • The <SLUG> must be unique to the <NYLAS_CLIENT_ID>.

You can create a public configuration using either the Scheduler API or the Scheduler Editor.

Create a public configuration using the Scheduler API

To create a public configuration for a Nylas-hosted Scheduling Page, make a Create Configuration request that includes the slug you want to use.

For the following code sample, Nylas hosts the Scheduling Page at https://book.nylas.com/us/<NYLAS_CLIENT_ID>/meet-nylas.

Terminal window
curl --request POST \
--url "<https://api.us.nylas.com/v3/grants/><NYLAS_GRANT_ID>/scheduling/configurations" \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <NYLAS_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"slug": "meet-nylas",
"participants":
[{
"name": "Dorothy Vaughan",
"email": "dorothy@emxaple.com",
"is_organizer": true,
"availability": {
"calendar_ids": [
"primary"
]
},
"booking": {
"calendar_id": "primary"
}
}
],
"availability": {
"duration_minutes": 30
},
"event_booking": {
"title": "My event"
},
"scheduler": {
"rescheduling_url": "https://book.nylas.com/us/reschedule/:booking_ref",
"cancellation_url": "https://book.nylas.com/us/cancel/:booking_ref",
"organizer_confirmation_url": "https://book.nylas.com/us/confirm/:booking_ref" /* Only required if you want to create organizer-confirmed bookings * /
}
}'

Create a public configuration using the Scheduler Editor

When you create a Scheduling Page using the Scheduler Editor in the UI, Nylas creates a corresponding configuration.

First, include the Scheduler Editor Component in your app. You must configure the following:

  • Make sure that the requires_session_auth property doesn’t exist or set its value to false.
  • Set requiresSlug to true. The Scheduler Editor will display a text box in the UI so organizers can enter a slug for the Scheduling Page.
  • Set schedulerPreviewLink to https://book.nylas.com/<REGION>/><NYLAS_CLIENT_ID>/{slug}.
    • Replace <REGION> with your region (either us or eu).
    • Replace <NYLAS_CLIENT_ID> with your Nylas client ID.
    • {slug} is a placeholder that the Scheduler Editor automatically updates.

The following examples add the Nylas Scheduler Editor for Nylas-hosted Scheduling Pages.

!!!include(v3_code_samples/scheduler/hosted-scheduler-editor.html" />
!!!include(v3_code_samples/scheduler/hosted-scheduler-editor-scheduling-app.tsx)!!!
!!!include(v3_code_samples/scheduler/quickstart-scheduler-editor-index.css)!!!

Next, create a Scheduling Page from the Scheduler Editor.

  1. Click Create new.
  2. On the Create New page, enter the event title, the event duration, and the slug for the hosted Scheduling Page.
  3. (Optional) Set other event details.
  4. Click Create.

More resources