API Reference
Complete reference of all methods in the Meeting BaaS TypeScript SDK
Client Creation
createBaasClient
Creates a new Meeting BaaS client instance.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | ✅ Yes | - | Your Meeting BaaS API key. Get yours at settings.meetingbaas.com |
timeout | number | ❌ No | 30000 | Request timeout in seconds. Some requests may take longer, so we recommend setting a longer timeout if you notice timeouts |
base_url | string | ❌ No | "https://api.meetingbaas.com" | Base URL for the API (internal parameter) |
import { createBaasClient } from "@meeting-baas/sdk";
const client = createBaasClient({
api_key: "your-api-key",
timeout: 30000 // optional, default: 30000
});Returns:
BaasClientinstance
Bot Management Methods
joinMeeting
Have a bot join a meeting, now or in the future.
Parameters:
params: JoinRequest - Join meeting configuration
Returns:
success: Boolean (true if bot joined successfully, false in case of any errors)data: JoinResponse - bot_id of the bot joining the meetingerror: Error, if any
// Type imports
import type { JoinRequest, JoinResponse } from "@meeting-baas/sdk";// Example
const { success, data, error } = await client.joinMeeting({
bot_name: "Meeting Assistant",
meeting_url: "https://meet.google.com/abc-def-ghi",
reserved: true,
bot_image: "https://example.com/bot-image.jpg",
enter_message: "Hello from the bot!",
extra: { custom_id: "my-meeting" },
recording_mode: "speaker_view",
speech_to_text: { provider: "Gladia" },
webhook_url: "https://example.com/webhook",
noone_joined_timeout: 300,
waiting_room_timeout: 600
});
if (success) {
console.log("Bot joined successfully:", data.bot_id);
} else {
console.error("Error joining meeting:", error);
}leaveMeeting
Have a bot leave a meeting.
Parameters:
params:{ uuid: string }- Bot UUID to leave the meeting
Returns:
success: Boolean (true if bot left successfully, false in case of any errors)data: LeaveResponse - Bot leave confirmation dataerror: Error, if any
// Type imports
import type { LeaveResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.leaveMeeting({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Bot left successfully:", data.bot_id);
} else {
console.error("Error leaving meeting:", error);
}getMeetingData
Get meeting recording and metadata.
Parameters:
params: GetMeetingDataParams - Parameters for retrieving meeting data
Returns:
success: Boolean (true if meeting data retrieved successfully, false in case of any errors)data: Metadata - Meeting metadata and recording informationerror: Error, if any
// Type imports
import type { GetMeetingDataParams, Metadata } from "@meeting-baas/sdk";const { success, data, error } = await client.getMeetingData({
bot_id: "123e4567-e89b-12d3-a456-426614174000",
include_transcripts: true
});
if (success) {
console.log("Meeting duration:", data.duration);
console.log("MP4 URL:", data.mp4);
console.log("Transcript count:", data.bot_data.transcripts.length);
} else {
console.error("Error getting meeting data:", error);
}deleteBotData
Delete bot data permanently.
Parameters:
params:{ uuid: string }- Bot UUID to delete
Returns:
success: Boolean (true if bot data deleted successfully, false in case of any errors)data: DeleteResponse - Deletion confirmationerror: Error, if any
// Type imports
import type { DeleteResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.deleteBotData({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Bot data deleted successfully");
} else {
console.error("Error deleting bot data:", error);
}listBots
Retrieves a paginated list of the user's bots with essential metadata, including IDs, names, and meeting details.
Parameters:
params?: BotsWithMetadataParams - Optional filtering and pagination parameters
Returns:
success: Boolean (true if bots retrieved successfully, false in case of any errors)data: ListRecentBotsResponse - Paginated list of bots with metadataerror: Error, if any
// Type imports
import type { BotsWithMetadataParams, ListRecentBotsResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.listBots({
limit: 10,
cursor: "base64-cursor-string",
bot_name: "Sales",
created_after: "2024-01-01T00:00:00Z",
filter_by_extra: "customer_id:12345"
});
if (success) {
console.log("Bots found:", data.bots.length);
console.log("Has more:", data.has_more);
} else {
console.error("Error listing bots:", error);
}retranscribeBot
Transcribe or retranscribe a bot's audio using the Default or your provided Speech to Text Provider.
Parameters:
params: RetranscribeBody - Retranscription configuration
Returns:
success: Boolean (true if retranscription started successfully, false in case of any errors)error: Error, if any
// Type imports
import type { RetranscribeBody } from "@meeting-baas/sdk";const { success, error } = await client.retranscribeBot({
bot_uuid: "123e4567-e89b-12d3-a456-426614174000",
speech_to_text: { provider: "Gladia" },
webhook_url: "https://example.com/webhook"
});
if (success) {
console.log("Retranscription started successfully");
} else {
console.error("Error starting retranscription:", error);
}getScreenshots
Retrieves screenshots captured during the bot's session before it joins a meeting.
Parameters:
params:{ uuid: string }- Bot UUID to retrieve screenshots for
Returns:
success: Boolean (true if screenshots retrieved successfully, false in case of any errors)data: ScreenshotsList - Array of screenshot dataerror: Error, if any
// Type imports
import type { ScreenshotsList } from "@meeting-baas/sdk";const { success, data, error } = await client.getScreenshots({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Screenshots found:", data.length);
data.forEach(screenshot => {
console.log("Screenshot:", screenshot.url, "Date:", screenshot.date);
});
} else {
console.error("Error getting screenshots:", error);
}Calendar Management Methods
createCalendar
Integrates a new calendar with the system using OAuth credentials. This endpoint establishes a connection with the calendar provider (Google, Microsoft), sets up webhook notifications for real-time updates, and performs an initial sync of all calendar events. It requires OAuth credentials (client ID, client secret, and refresh token) and the platform type. Once created, the calendar is assigned a unique UUID that should be used for all subsequent operations. Returns the newly created calendar object with all integration details.
Parameters:
params: CreateCalendarParams - Calendar integration parameters
Returns:
success: Boolean (true if calendar created successfully, false in case of any errors)data: CreateCalendarResponse - Created calendar informationerror: Error, if any
// Type imports
import type { CreateCalendarParams, CreateCalendarResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.createCalendar({
oauth_client_id: "your-oauth-client-id",
oauth_client_secret: "your-oauth-client-secret",
oauth_refresh_token: "your-oauth-refresh-token",
platform: "Google",
raw_calendar_id: "optional-calendar-id"
});
if (success) {
console.log("Calendar created:", data.calendar.name);
console.log("Calendar UUID:", data.calendar.uuid);
} else {
console.error("Error creating calendar:", error);
}listCalendars
Retrieves all calendars that have been integrated with the system for the authenticated user. Returns a list of calendars with their names, email addresses, provider information, and sync status. This endpoint shows only calendars that have been formally connected through the create_calendar endpoint, not all available calendars from the provider.
Parameters:
- None
Returns:
success: Boolean (true if calendars retrieved successfully, false in case of any errors)data: Calendar[] - Array of integrated calendarserror: Error, if any
// Type imports
import type { Calendar } from "@meeting-baas/sdk";const { success, data, error } = await client.listCalendars();
if (success) {
console.log("Calendars found:", data.length);
data.forEach(calendar => {
console.log("Calendar:", calendar.name, "Email:", calendar.email);
});
} else {
console.error("Error listing calendars:", error);
}getCalendar
Retrieves detailed information about a specific calendar integration by its UUID. Returns comprehensive calendar data including the calendar name, email address, provider details (Google, Microsoft), sync status, and other metadata. This endpoint is useful for displaying calendar information to users or verifying the status of a calendar integration before performing operations on its events.
Parameters:
params:{ uuid: string }- Calendar UUID to retrieve
Returns:
success: Boolean (true if calendar retrieved successfully, false in case of any errors)data: Calendar - Calendar detailserror: Error, if any
// Type imports
import type { Calendar } from "@meeting-baas/sdk";const { success, data, error } = await client.getCalendar({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Calendar details:", data);
} else {
console.error("Error getting calendar:", error);
}updateCalendar
Updates a calendar integration with new credentials or platform while maintaining the same UUID. This operation is performed as an atomic transaction to ensure data integrity. The system automatically unschedules existing bots to prevent duplicates, updates the calendar credentials, and triggers a full resync of all events. Useful when OAuth tokens need to be refreshed or when migrating a calendar between providers. Returns the updated calendar object with its new configuration.
Parameters:
params:{ uuid: string; body: [UpdateCalendarParams](/docs/api/reference/calendars/update_calendar#request-body) }- Calendar UUID and update parameters
Returns:
success: Boolean (true if calendar updated successfully, false in case of any errors)data: CreateCalendarResponse - Updated calendar informationerror: Error, if any
// Type imports
import type { UpdateCalendarParams, CreateCalendarResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.updateCalendar({
uuid: "123e4567-e89b-12d3-a456-426614174000",
body: {
oauth_client_id: "new-oauth-client-id",
oauth_client_secret: "new-oauth-client-secret",
oauth_refresh_token: "new-oauth-refresh-token",
platform: "Google"
}
});
if (success) {
console.log("Calendar updated successfully");
} else {
console.error("Error updating calendar:", error);
}deleteCalendar
Permanently removes a calendar integration by its UUID, including all associated events and bot configurations. This operation cancels any active subscriptions with the calendar provider, stops all webhook notifications, and unschedules any pending recordings. All related resources are cleaned up in the database. This action cannot be undone, and subsequent requests to this calendar's UUID will return 404 Not Found errors.
Parameters:
params:{ uuid: string }- Calendar UUID to delete
Returns:
success: Boolean (true if calendar deleted successfully, false in case of any errors)error: Error, if any
const { success, error } = await client.deleteCalendar({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Calendar deleted successfully");
} else {
console.error("Error deleting calendar:", error);
}getCalendarEvent
Retrieves comprehensive details about a specific calendar event by its UUID. Returns complete event information including title, meeting link, start and end times, organizer status, recurrence information, and the full list of attendees with their names and email addresses. Also includes any associated bot parameters if recording is scheduled for this event. The raw calendar data from the provider is also included for advanced use cases.
Parameters:
params:{ uuid: string }- Event UUID to retrieve
Returns:
success: Boolean (true if event retrieved successfully, false in case of any errors)data: Event - Event detailserror: Error, if any
// Type imports
import type { Event } from "@meeting-baas/sdk";const { success, data, error } = await client.getCalendarEvent({
uuid: "123e4567-e89b-12d3-a456-426614174000"
});
if (success) {
console.log("Event:", data.name);
console.log("Start time:", data.start_time);
console.log("Meeting URL:", data.meeting_url);
console.log("Attendees:", data.attendees.length);
} else {
console.error("Error getting event:", error);
}scheduleCalendarRecordEvent
Configures a bot to automatically join and record a specific calendar event at its scheduled time. The request body contains detailed bot configuration, including recording options, streaming settings, and webhook notification URLs. For recurring events, the 'all_occurrences' parameter can be set to true to schedule recording for all instances of the recurring series, or false (default) to schedule only the specific instance. Returns the updated event(s) with the bot parameters attached.
Parameters:
params:{uuid: string; body: BotParam2; query?: ScheduleRecordEventParams}- Event UUID, bot configuration, and optional query parameters
Returns:
success: Boolean (true if recording scheduled successfully, false in case of any errors)data: Event[] - Array of scheduled eventserror: Error, if any
// Type imports
import type { BotParam2, ScheduleRecordEventParams, Event } from "@meeting-baas/sdk";const { success, data, error } = await client.scheduleCalendarRecordEvent({
uuid: "123e4567-e89b-12d3-a456-426614174000",
body: {
bot_name: "Event Recording Bot",
extra: { event_id: "my-event-123" },
recording_mode: "speaker_view",
speech_to_text: { provider: "Gladia" },
webhook_url: "https://example.com/webhook",
enter_message: "Hello! I'm here to record this meeting."
},
query: { all_occurrences: true }
});
if (success) {
console.log("Recording scheduled successfully");
} else {
console.error("Error scheduling recording:", error);
}unscheduleCalendarRecordEvent
Cancels a previously scheduled recording for a calendar event and releases associated bot resources. For recurring events, the 'all_occurrences' parameter controls whether to unschedule from all instances of the recurring series or just the specific occurrence. This operation is idempotent and will not error if no bot was scheduled. Returns the updated event(s) with the bot parameters removed.
Parameters:
params:{uuid: string; query?: UnscheduleRecordEventParams}- Event UUID and optional query parameters
Returns:
success: Boolean (true if recording unscheduled successfully, false in case of any errors)data: Event[] - Array of unscheduled eventserror: Error, if any
// Type imports
import type { UnscheduleRecordEventParams, Event } from "@meeting-baas/sdk";const { success, data, error } = await client.unscheduleCalendarRecordEvent({
uuid: "123e4567-e89b-12d3-a456-426614174000",
query: { all_occurrences: true }
});
if (success) {
console.log("Recording unscheduled successfully");
} else {
console.error("Error unscheduling recording:", error);
}patchBot
Updates the configuration of a bot already scheduled to record an event. Allows modification of recording settings, webhook URLs, and other bot parameters without canceling and recreating the scheduled recording. For recurring events, the 'all_occurrences' parameter determines whether changes apply to all instances or just the specific occurrence. Returns the updated event(s) with the modified bot parameters.
Parameters:
params:{uuid: string; body: BotParam3; query?: PatchBotParams}- Event UUID, bot configuration updates, and optional query parameters
Returns:
success: Boolean (true if bot configuration updated successfully, false in case of any errors)data: Event[] - Array of updated eventserror: Error, if any
// Type imports
import type { BotParam3, PatchBotParams, Event } from "@meeting-baas/sdk";const { success, data, error } = await client.patchBot({
uuid: "123e4567-e89b-12d3-a456-426614174000",
body: {
bot_name: "Updated Bot Name",
enter_message: "Updated enter message",
webhook_url: "https://new-webhook.com/webhook"
},
query: { all_occurrences: false }
});
if (success) {
console.log("Bot configuration updated successfully");
} else {
console.error("Error updating bot configuration:", error);
}listCalendarEvents
Retrieves a paginated list of calendar events with comprehensive filtering options. Supports filtering by organizer email, attendee email, date ranges (start_date_gte, start_date_lte), and event status. Results can be limited to upcoming events (default), past events, or all events. Each event includes full details such as meeting links, participants, and recording status. The response includes a 'next' pagination cursor for retrieving additional results.
Parameters:
query: ListEventsParams - Filtering and pagination parameters
Returns:
success: Boolean (true if events retrieved successfully, false in case of any errors)data: ListEventResponse - Paginated list of eventserror: Error, if any
// Type imports
import type { ListEventsParams, ListEventResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.listCalendarEvents({
calendar_id: "123e4567-e89b-12d3-a456-426614174000",
start_date_gte: "2024-01-01T00:00:00Z",
start_date_lte: "2024-12-31T23:59:59Z",
status: "upcoming",
attendee_email: "user@example.com",
organizer_email: "organizer@example.com"
});
if (success) {
console.log("Events found:", data.events.length);
console.log("Next cursor:", data.next);
} else {
console.error("Error listing events:", error);
}resyncAllCalendars
Triggers a full resync of all calendar events for all integrated calendars. This operation is useful when you need to ensure that all calendar data is up-to-date in the system. It will re-fetch all events from the calendar providers and update the system's internal state. Returns a response indicating the status of the resync operation.
Parameters:
- None
Returns:
success: Boolean (true if calendars resynced successfully, false in case of any errors)data: ResyncAllResponse - Resync results and any errorserror: Error, if any
// Type imports
import type { ResyncAllResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.resyncAllCalendars();
if (success) {
console.log("Calendars synced:", data.synced_calendars.length);
if (data.errors.length > 0) {
console.log("Sync errors:", data.errors);
}
} else {
console.error("Error resyncing calendars:", error);
}listRawCalendars
Retrieves unprocessed calendar data directly from the provider (Google, Microsoft) using provided OAuth credentials. This endpoint is typically used during the initial setup process to allow users to select which calendars to integrate. Returns a list of available calendars with their unique IDs, email addresses, and primary status. This data is not persisted until a calendar is formally created using the create_calendar endpoint.
Parameters:
params: ListRawCalendarsParams - OAuth credentials and platform
Returns:
success: Boolean (true if raw calendars retrieved successfully, false in case of any errors)data: ListRawCalendarsResponse - Raw calendar data from providererror: Error, if any
// Type imports
import type { ListRawCalendarsParams, ListRawCalendarsResponse } from "@meeting-baas/sdk";const { success, data, error } = await client.listRawCalendars({
oauth_client_id: "your-oauth-client-id",
oauth_client_secret: "your-oauth-client-secret",
oauth_refresh_token: "your-oauth-refresh-token",
platform: "Google"
});
if (success) {
console.log("Raw calendars found:", data.calendars.length);
data.calendars.forEach(calendar => {
console.log("Calendar:", calendar.email, "Primary:", calendar.is_primary);
});
} else {
console.error("Error listing raw calendars:", error);
}Webhook Methods
getWebhookDocumentation
Retrieves the full documentation for the webhook events that Meeting BaaS sends to your webhook URL. This includes all event types, their payload structures, and any additional metadata. Useful for developers to understand and integrate webhook functionality into their applications.
Parameters:
- None
Returns:
success: Boolean (true if documentation retrieved successfully, false in case of any errors)data: Webhook documentation dataerror: Error, if any
const { success, data, error } = await client.getWebhookDocumentation();
if (success) {
console.log("Webhook documentation:", data);
} else {
console.error("Error getting webhook documentation:", error);
}getBotWebhookDocumentation
Retrieves the full documentation for the webhook events that Meeting BaaS sends to your webhook URL for a specific bot. This includes all event types, their payload structures, and any additional metadata. Useful for developers to understand and integrate webhook functionality into their applications.
Parameters:
- None
Returns:
success: Boolean (true if documentation retrieved successfully, false in case of any errors)data: Bot webhook documentation dataerror: Error, if any
const { success, data, error } = await client.getBotWebhookDocumentation();
if (success) {
console.log("Bot Webhook documentation:", data);
} else {
console.error("Error getting bot webhook documentation:", error);
}getCalendarWebhookDocumentation
Retrieves the full documentation for the webhook events that Meeting BaaS sends to your webhook URL for a specific calendar. This includes all event types, their payload structures, and any additional metadata. Useful for developers to understand and integrate webhook functionality into their applications.
Parameters:
- None
Returns:
success: Boolean (true if documentation retrieved successfully, false in case of any errors)data: Calendar webhook documentation dataerror: Error, if any
const { success, data, error } = await client.getCalendarWebhookDocumentation();
if (success) {
console.log("Calendar Webhook documentation:", data);
} else {
console.error("Error getting calendar webhook documentation:", error);
}Response Types
All SDK methods return a discriminated union response:
type ApiResponse<T> =
| { success: true; data: T; error?: never }
| { success: false; error: ZodError | Error; data?: never }Success Response
When success is true, the response contains:
data: The actual response data of typeTerror: Never present
Error Response
When success is false, the response contains:
error: Either aZodError(validation error) orError(API error)data: Never present
Error Handling
The SDK provides type-safe error handling:
import { ZodError } from "zod";
const result = await client.joinMeeting({
meeting_url: "https://meet.google.com/abc-def-ghi",
bot_name: "My Bot"
});
if (result.success) {
// TypeScript knows result.data is JoinResponse
console.log("Bot ID:", result.data.bot_id);
} else {
// TypeScript knows result.error is ZodError | Error
if (result.error instanceof ZodError) {
console.error("Validation error:", result.error.errors);
} else {
console.error("API error:", result.error.message);
}
}TypeScript Support
The SDK provides full TypeScript support with generated types from the OpenAPI specification:
import type {
JoinRequest,
JoinResponse,
CreateCalendarParams,
BotParam2,
Metadata
} from "@meeting-baas/sdk";
// All types are available for advanced usage
const joinParams: JoinRequest = {
meeting_url: "https://meet.google.com/abc-def-ghi",
bot_name: "My Bot",
reserved: false
};Related Documentation
- Getting Started - Quick setup guide
- Quick Start - Comprehensive usage examples
- Integration Guide - Advanced integration patterns
- MCP Tools - Using with Model Context Protocol
- Advanced Examples - Complex use cases
