Skip to content

scheduler

AdditionalField dataclass

Class representation of an additional field.

Atributes

label: The text label to be displayed in the Scheduler UI. type: The field type. Supported values are text, multi_line_text, email, phone_number, dropdown, date, checkbox, and radio_button required: Whether the field is required to be filled out by the guest when booking an event. pattern: A regular expression pattern that the value of the field must match. order: The order in which the field will be displayed in the Scheduler UI. Fields with lower order values will be displayed first. options: A list of options for the dropdown or radio_button types. This field is required for the dropdown and radio_button types.

Source code in nylas/models/scheduler.py
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@dataclass_json
@dataclass
class AdditionalField:
    """
    Class representation of an additional field.

    Atributes:
		label: The text label to be displayed in the Scheduler UI.
		type: The field type. Supported values are text, multi_line_text, email, phone_number, dropdown, date, checkbox, and radio_button
		required: Whether the field is required to be filled out by the guest when booking an event.
		pattern: A regular expression pattern that the value of the field must match.
		order: The order in which the field will be displayed in the Scheduler UI. Fields with lower order values will be displayed first.
		options: A list of options for the dropdown or radio_button types. This field is required for the dropdown and radio_button types.
    """
    label: str
    type: AdditionalFieldType
    required: bool
    pattern: Optional[str] = None
    order: Optional[int] = None
    options: Optional[AdditonalFieldOptionsType] = None

Availability dataclass

Class representation of availability settings.

Attributes:

Name Type Description
duration_minutes int

The total number of minutes the event should last.

interval_minutes Optional[int]

The interval between meetings in minutes.

round_to Optional[int]

Nylas rounds each time slot to the nearest multiple of this number of minutes.

availability_rules Optional[AvailabilityRules]

Availability rules for scheduling configuration.

Source code in nylas/models/scheduler.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
@dataclass_json
@dataclass
class Availability:
    """
    Class representation of availability settings.

    Attributes:
        duration_minutes: The total number of minutes the event should last.
        interval_minutes: The interval between meetings in minutes.
        round_to: Nylas rounds each time slot to the nearest multiple of this number of minutes.
        availability_rules: Availability rules for scheduling configuration.
    """
    duration_minutes: int
    interval_minutes: Optional[int] = None
    round_to: Optional[int] = None
    availability_rules: Optional[AvailabilityRules] = None

Booking dataclass

Class representation of a booking.

Attributes:

Name Type Description
booking_id str

The unique ID of the booking.

event_id str

The unique ID of the event associated with the booking.

title str

The title of the event.

organizer BookingOrganizer

The participant designated as the organizer of the event.

status BookingStatus

The current status of the booking.

description Optional[str]

The description of the event.

Source code in nylas/models/scheduler.py
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
@dataclass_json
@dataclass
class Booking:
    """
    Class representation of a booking.

    Attributes:
        booking_id: The unique ID of the booking.
        event_id: The unique ID of the event associated with the booking.
        title: The title of the event.
        organizer: The participant designated as the organizer of the event.
        status: The current status of the booking.
        description: The description of the event.
    """
    booking_id: str
    event_id: str
    title: str
    organizer: BookingOrganizer
    status: BookingStatus
    description: Optional[str] = None

BookingConfirmedTemplate dataclass

Class representation of booking confirmed template settings.

Attributes:

Name Type Description
title Optional[str]

The title to replace the default 'Booking Confirmed' title.

body Optional[str]

The additional body to be appended after the default body.

Source code in nylas/models/scheduler.py
16
17
18
19
20
21
22
23
24
25
26
27
@dataclass_json
@dataclass
class BookingConfirmedTemplate:
    """
    Class representation of booking confirmed template settings.

    Attributes:
        title: The title to replace the default 'Booking Confirmed' title.
        body: The additional body to be appended after the default body.
    """
    title: Optional[str] = None
    body: Optional[str] = None

BookingGuest dataclass

Class representation of a booking guest.

Attributes:

Name Type Description
email str

The email address of the guest.

name str

The name of the guest.

Source code in nylas/models/scheduler.py
272
273
274
275
276
277
278
279
280
281
282
283
@dataclass_json
@dataclass
class BookingGuest:
    """
    Class representation of a booking guest.

    Attributes:
        email: The email address of the guest.
        name: The name of the guest.
    """
    email: str
    name: str

BookingOrganizer dataclass

Class representation of a booking organizer.

Attributes:

Name Type Description
email str

The email address of the participant designated as the organizer of the event.

name Optional[str]

The name of the participant designated as the organizer of the event.

Source code in nylas/models/scheduler.py
323
324
325
326
327
328
329
330
331
332
333
334
@dataclass_json
@dataclass
class BookingOrganizer:
    """
    Class representation of a booking organizer.

    Attributes:
        email: The email address of the participant designated as the organizer of the event.
        name: The name of the participant designated as the organizer of the event.
    """
    email: str
    name: Optional[str] = None

BookingParticipant dataclass

Class representation of a booking participant.

Attributes:

Name Type Description
email str

The email address of the participant to include in the booking.

Source code in nylas/models/scheduler.py
285
286
287
288
289
290
291
292
293
294
@dataclass_json
@dataclass
class BookingParticipant:
    """
    Class representation of a booking participant.

    Attributes:
        email: The email address of the participant to include in the booking.
    """
    email: str

BookingReminder dataclass

Class representation of a booking reminder.

Attributes:

Name Type Description
type str

The reminder type.

minutes_before_event int

The number of minutes before the event to send the reminder.

recipient Optional[str]

The recipient of the reminder.

email_subject Optional[str]

The subject of the email reminder.

Source code in nylas/models/scheduler.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
@dataclass_json
@dataclass
class BookingReminder:
    """
    Class representation of a booking reminder.

    Attributes:
        type: The reminder type.
        minutes_before_event: The number of minutes before the event to send the reminder.
        recipient: The recipient of the reminder.
        email_subject: The subject of the email reminder.
    """
    type: str
    minutes_before_event: int
    recipient: Optional[str] = None
    email_subject: Optional[str] = None

ConfigParticipant dataclass

Class representation of a booking participant.

Attributes:

Name Type Description
email str

Participant's email address.

availability ParticipantAvailability

Availability data for the participant.

booking ParticipantBooking

Booking data for the participant.

name Optional[str]

Participant's name.

is_organizer Optional[bool]

Whether the participant is the organizer of the event.

timezone Optional[str]

The participant's timezone.

Source code in nylas/models/scheduler.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
@dataclass_json
@dataclass
class ConfigParticipant:
    """
    Class representation of a booking participant.

    Attributes:
        email: Participant's email address.
        availability: Availability data for the participant.
        booking: Booking data for the participant.
        name: Participant's name.
        is_organizer: Whether the participant is the organizer of the event.
        timezone: The participant's timezone.
    """
    email: str
    availability: ParticipantAvailability
    booking: ParticipantBooking
    name: Optional[str] = None
    is_organizer: Optional[bool] = None
    timezone: Optional[str] = None

Configuration dataclass

Class representation of a scheduler configuration.

Attributes:

Name Type Description
participants List[ConfigParticipant]

List of participants included in the scheduled event.

availability Availability

Rules that determine available time slots for the event.

event_booking EventBooking

Booking data for the event.

slug Optional[str]

Unique identifier for the Configuration object.

requires_session_auth Optional[bool]

If true, scheduling Availability and Bookings endpoints require a valid session ID.

scheduler Optional[SchedulerSettings]

Settings for the Scheduler UI.

appearance Optional[Dict[str, str]]

Appearance settings for the Scheduler UI.

Source code in nylas/models/scheduler.py
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
@dataclass_json
@dataclass
class Configuration:
    """
    Class representation of a scheduler configuration.

    Attributes:
        participants: List of participants included in the scheduled event.
        availability: Rules that determine available time slots for the event.
        event_booking: Booking data for the event.
        slug: Unique identifier for the Configuration object.
        requires_session_auth: If true, scheduling Availability and Bookings endpoints require a valid session ID.
        scheduler: Settings for the Scheduler UI.
        appearance: Appearance settings for the Scheduler UI.
    """
    participants: List[ConfigParticipant]
    availability: Availability
    event_booking: EventBooking
    slug: Optional[str] = None
    requires_session_auth: Optional[bool] = None
    scheduler: Optional[SchedulerSettings] = None
    appearance: Optional[Dict[str, str]] = None

ConfirmBookingRequest dataclass

Class representation of a confirm booking request.

Attributes:

Name Type Description
salt str

The salt extracted from the booking reference embedded in the organizer confirmation link.

status ConfirmBookingStatus

The action to take on the pending booking.

cancellation_reason Optional[str]

The reason the booking is being cancelled.

Source code in nylas/models/scheduler.py
362
363
364
365
366
367
368
369
370
371
372
373
374
375
@dataclass_json
@dataclass
class ConfirmBookingRequest:
    """
    Class representation of a confirm booking request.

    Attributes:
        salt: The salt extracted from the booking reference embedded in the organizer confirmation link.
        status: The action to take on the pending booking.
        cancellation_reason: The reason the booking is being cancelled.
    """
    salt: str
    status: ConfirmBookingStatus
    cancellation_reason: Optional[str] = None

CreateBookingQueryParams dataclass

Class representation of query parameters for creating a booking.

Attributes:

Name Type Description
configuration_id Optional[str]

The ID of the Configuration object whose settings are used for calculating availability. If you're using session authentication (requires_session_auth is set to true), configuration_id is not required.

slug Optional[str]

The slug of the Configuration object whose settings are used for calculating availability. If you're using session authentication (requires_session_auth is set to true) or using configurationId, slug is not required.

timezone Optional[str]

The timezone to use for the booking. If not provided, Nylas uses the timezone from the Configuration object.

Source code in nylas/models/scheduler.py
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
@dataclass_json
@dataclass
class CreateBookingQueryParams:
    """
    Class representation of query parameters for creating a booking.

    Attributes:
      configuration_id: The ID of the Configuration object whose settings are used for calculating availability. 
      	If you're using session authentication (requires_session_auth is set to true), configuration_id is not required.
      slug: The slug of the Configuration object whose settings are used for calculating availability. 
      	If you're using session authentication (requires_session_auth is set to true) or using configurationId, slug is not required.
      timezone: The timezone to use for the booking. If not provided, Nylas uses the timezone from the Configuration object.
    """
    configuration_id: Optional[str] = None
    slug: Optional[str] = None
    timezone: Optional[str] = None

CreateBookingRequest dataclass

Class representation of a create booking request.

Attributes:

Name Type Description
start_time int

The event's start time, in Unix epoch format.

end_time int

The event's end time, in Unix epoch format.

guest BookingGuest

Details about the guest that is creating the booking.

participants Optional[List[BookingParticipant]]

List of participant email addresses from the Configuration object to include in the booking.

timezone Optional[str]

The guest's timezone that is used in email notifications.

email_language Optional[EmailLanguage]

The language of the guest email notifications.

additional_guests Optional[List[BookingGuest]]

List of additional guest email addresses to include in the booking.

additional_fields Optional[Dict[str, str]]

Dictionary of additional field keys mapped to values populated by the guest in the booking form.

Source code in nylas/models/scheduler.py
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
@dataclass_json
@dataclass
class CreateBookingRequest:
    """
    Class representation of a create booking request.

    Attributes:
        start_time: The event's start time, in Unix epoch format.
        end_time: The event's end time, in Unix epoch format.
        guest: Details about the guest that is creating the booking.
        participants: List of participant email addresses from the Configuration object to include in the booking.
        timezone: The guest's timezone that is used in email notifications.
        email_language: The language of the guest email notifications.
        additional_guests: List of additional guest email addresses to include in the booking.
        additional_fields: Dictionary of additional field keys mapped to values populated by the guest in the booking form.
    """
    start_time: int
    end_time: int
    guest: BookingGuest
    participants: Optional[List[BookingParticipant]] = None
    timezone: Optional[str] = None
    email_language: Optional[EmailLanguage] = None
    additional_guests: Optional[List[BookingGuest]] = None
    additional_fields: Optional[Dict[str, str]] = None

DeleteBookingRequest dataclass

Class representation of a delete booking request.

Attributes:

Name Type Description
cancellation_reason Optional[str]

The reason the booking is being cancelled.

Source code in nylas/models/scheduler.py
377
378
379
380
381
382
383
384
385
386
@dataclass_json
@dataclass
class DeleteBookingRequest:
    """
    Class representation of a delete booking request.

    Attributes:
        cancellation_reason: The reason the booking is being cancelled.
    """
    cancellation_reason: Optional[str] = None

EmailTemplate dataclass

Class representation of email template settings.

Attributes:

Name Type Description
logo

The URL to a custom logo that appears at the top of the booking email.

booking_confirmed Optional[BookingConfirmedTemplate]

Configurable settings specifically for booking confirmed emails.

Source code in nylas/models/scheduler.py
30
31
32
33
34
35
36
37
38
39
40
41
@dataclass_json
@dataclass
class EmailTemplate:
    """
    Class representation of email template settings.

    Attributes:
        logo: The URL to a custom logo that appears at the top of the booking email.
        booking_confirmed: Configurable settings specifically for booking confirmed emails.
    """
    # logo: Optional[str] = None
    booking_confirmed: Optional[BookingConfirmedTemplate] = None

EventBooking dataclass

Class representation of an event booking.

Attributes:

Name Type Description
title str

The title of the event.

description Optional[str]

The description of the event.

location Optional[str]

The location of the event.

timezone Optional[str]

The timezone for displaying times in confirmation email messages and reminders.

booking_type Optional[BookingType]

The type of booking.

conferencing Optional[Conferencing]

Conference details for the event.

disable_emails Optional[bool]

Whether Nylas sends email messages when an event is booked, cancelled, or rescheduled.

reminders Optional[List[BookingReminder]]

The list of reminders to send to participants before the event starts.

Source code in nylas/models/scheduler.py
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@dataclass_json
@dataclass
class EventBooking:
    """
    Class representation of an event booking.

    Attributes:
        title: The title of the event.
        description: The description of the event.
        location: The location of the event.
        timezone: The timezone for displaying times in confirmation email messages and reminders.
        booking_type: The type of booking.
        conferencing: Conference details for the event.
        disable_emails: Whether Nylas sends email messages when an event is booked, cancelled, or rescheduled.
        reminders: The list of reminders to send to participants before the event starts.
    """
    title: str
    description: Optional[str] = None
    location: Optional[str] = None
    timezone: Optional[str] = None
    booking_type: Optional[BookingType] = None
    conferencing: Optional[Conferencing] = None
    disable_emails: Optional[bool] = None
    reminders: Optional[List[BookingReminder]] = None

FindBookingQueryParams

Class representation of query parameters for finding a booking.

Attributes:

Name Type Description
configuration_id Optional[str]

The ID of the Configuration object whose settings are used for calculating availability. If you're using session authentication (requires_session_auth is set to true), configuration_id is not required.

slug Optional[str]

The slug of the Configuration object whose settings are used for calculating availability. If you're using session authentication (requires_session_auth is set to true) or using configurationId, slug is not required.

client_id Optional[str]

The client ID that was used to create the Configuration object. client_id is required only if using slug.

Source code in nylas/models/scheduler.py
420
421
422
423
424
425
426
427
428
429
430
431
432
433
class FindBookingQueryParams:
    """
    Class representation of query parameters for finding a booking.

    Attributes:
      configuration_id: The ID of the Configuration object whose settings are used for calculating availability. 
    	If you're using session authentication (requires_session_auth is set to true), configuration_id is not required.
      slug:  The slug of the Configuration object whose settings are used for calculating availability. 
      	If you're using session authentication (requires_session_auth is set to true) or using configurationId, slug is not required.
      client_id: The client ID that was used to create the Configuration object. client_id is required only if using slug.
    """
    configuration_id: Optional[str] = None
    slug: Optional[str] = None
    client_id: Optional[str] = None

ParticipantAvailability dataclass

Class representation of participant availability.

Attributes:

Name Type Description
calendar_ids List[str]

List of calendar IDs associated with the participant's email address.

open_hours Optional[List[OpenHours]]

Open hours for this participant. The endpoint searches for free time slots during these open hours.

Source code in nylas/models/scheduler.py
174
175
176
177
178
179
180
181
182
183
184
185
@dataclass_json
@dataclass
class ParticipantAvailability:
    """
    Class representation of participant availability.

    Attributes:
        calendar_ids: List of calendar IDs associated with the participant's email address.
        open_hours: Open hours for this participant. The endpoint searches for free time slots during these open hours.
    """
    calendar_ids: List[str]
    open_hours: Optional[List[OpenHours]] = None

ParticipantBooking dataclass

Class representation of a participant booking.

Attributes:

Name Type Description
calendar_id str

The calendar ID that the event is created in.

Source code in nylas/models/scheduler.py
162
163
164
165
166
167
168
169
170
171
@dataclass_json
@dataclass
class ParticipantBooking:
    """
    Class representation of a participant booking.

    Attributes:
        calendar_id: The calendar ID that the event is created in.
    """
    calendar_id: str

RescheduleBookingRequest dataclass

Class representation of a reschedule booking request.

Attributes:

Name Type Description
start_time int

The event's start time, in Unix epoch format.

end_time int

The event's end time, in Unix epoch format.

Source code in nylas/models/scheduler.py
389
390
391
392
393
394
395
396
397
398
399
400
@dataclass_json
@dataclass
class RescheduleBookingRequest:
    """
    Class representation of a reschedule booking request.

    Attributes:
        start_time: The event's start time, in Unix epoch format.
        end_time: The event's end time, in Unix epoch format.
    """
    start_time: int
    end_time: int

SchedulerSettings dataclass

Class representation of scheduler settings.

Attributes:

Name Type Description
additional_fields Optional[Dict[str, AdditionalField]]

Definitions for additional fields to be displayed in the Scheduler UI.

available_days_in_future Optional[int]

Number of days in the future that Scheduler is available for scheduling events.

min_booking_notice Optional[int]

Minimum number of minutes in the future that a user can make a new booking.

min_cancellation_notice Optional[int]

Minimum number of minutes before a booking can be cancelled.

cancellation_policy Optional[str]

A message about the cancellation policy to display when booking an event.

rescheduling_url Optional[str]

The URL used to reschedule bookings.

cancellation_url Optional[str]

The URL used to cancel bookings.

organizer_confirmation_url Optional[str]

The URL used to confirm or cancel pending bookings.

confirmation_redirect_url Optional[str]

The custom URL to redirect to once the booking is confirmed.

hide_rescheduling_options Optional[bool]

Whether the option to reschedule an event is hidden in booking confirmations and notifications.

hide_cancellation_options Optional[bool]

Whether the option to cancel an event is hidden in booking confirmations and notifications.

hide_additional_guests Optional[bool]

Whether to hide the additional guests field on the scheduling page.

email_template Optional[EmailTemplate]

Configurable settings for booking emails.

Source code in nylas/models/scheduler.py
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@dataclass_json
@dataclass
class SchedulerSettings:
    """
    Class representation of scheduler settings.

    Attributes:
        additional_fields: Definitions for additional fields to be displayed in the Scheduler UI.
        available_days_in_future: Number of days in the future that Scheduler is available for scheduling events.
        min_booking_notice: Minimum number of minutes in the future that a user can make a new booking.
        min_cancellation_notice: Minimum number of minutes before a booking can be cancelled.
        cancellation_policy: A message about the cancellation policy to display when booking an event.
        rescheduling_url: The URL used to reschedule bookings.
        cancellation_url: The URL used to cancel bookings.
        organizer_confirmation_url: The URL used to confirm or cancel pending bookings.
        confirmation_redirect_url: The custom URL to redirect to once the booking is confirmed.
        hide_rescheduling_options: Whether the option to reschedule an event is hidden in booking confirmations and notifications.
        hide_cancellation_options: Whether the option to cancel an event is hidden in booking confirmations and notifications.
        hide_additional_guests: Whether to hide the additional guests field on the scheduling page.
        email_template: Configurable settings for booking emails.
    """
    additional_fields: Optional[Dict[str, AdditionalField]] = None
    available_days_in_future: Optional[int] = None
    min_booking_notice: Optional[int] = None
    min_cancellation_notice: Optional[int] = None
    cancellation_policy: Optional[str] = None
    rescheduling_url: Optional[str] = None
    cancellation_url: Optional[str] = None
    organizer_confirmation_url: Optional[str] = None
    confirmation_redirect_url: Optional[str] = None
    hide_rescheduling_options: Optional[bool] = None
    hide_cancellation_options: Optional[bool] = None
    hide_additional_guests: Optional[bool] = None
    email_template: Optional[EmailTemplate] = None

Session dataclass

Class representation of a session.

Attributes:

Name Type Description
session_id str

The ID of the session.

Source code in nylas/models/scheduler.py
260
261
262
263
264
265
266
267
268
269
@dataclass_json
@dataclass
class Session:
    """
    Class representation of a session.

    Attributes:
        session_id: The ID of the session.
    """
    session_id: str