SDK
The official TypeScript SDK for Slatis. Full type safety, React hooks, and an embeddable booking widget.
Installation
Configuration
Use sk_* keys on the server only. For browser contexts, use pk_* public keys — they are scoped to booking creation and availability.
Bookings
Status transitions
Team
Webhooks
Webhook management requires a secret key with the webhooks:manage scope.
React hooks
Wrap your app with SlatisProvider once — all hooks read the key from context:
Available hooks
| Hook | Description |
|---|---|
useAvailability | Fetch and manage available time slots |
useBooking | Create, cancel, reschedule bookings |
useEventTypes | List your organization's active event types |
useCapacity | Team capacity and utilization |
useForm | Form state management with validation |
useFormSchema | Load custom field schemas for an event type |
useTracking | UTM and session attribution |
Embeddable widget
Zero-configuration widget for static sites and non-React apps:
Listen for booking events:
Error handling
The SDK throws typed error classes that map to API error codes: