Skip to main content
Retrieves a paginated list of all calendar connections. You can filter by platform, status, email, or creation date.

Method Signature

await client.calendar.list(params: ListCalendarParams): Promise<CalendarListResponse>

Parameters

platform
CalendarPlatform
Filter calendars by platform. Can be google_calendar or microsoft_outlook.
status
CalendarStatus
Filter calendars by connection status. Can be connecting, connected, or disconnected.
email
string
Filter calendars by the associated email address.
created_at__gte
Date
Filter calendars created on or after this date. Useful for retrieving recently added calendars.
cursor
string
Pagination cursor for retrieving the next page of results. Use the cursor returned in the previous response.

Response

Returns a paginated list of calendar objects with their connection details.

Examples

List All Calendars

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

const response = await client.calendar.list({});

console.log('Total calendars:', response.data.length);
response.data.forEach(calendar => {
  console.log(`${calendar.oauth_email} - ${calendar.platform} - ${calendar.status}`);
});

Filter by Platform

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

// Get only Google Calendar connections
const googleCalendars = await client.calendar.list({
  platform: 'google_calendar'
});

console.log('Google calendars:', googleCalendars.data.length);

Filter by Status

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

// Get only connected calendars
const connectedCalendars = await client.calendar.list({
  status: 'connected'
});

console.log('Connected calendars:', connectedCalendars.data.length);

Filter by Email

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

// Get calendars for a specific user
const userCalendars = await client.calendar.list({
  email: '[email protected]'
});

console.log('Calendars for user:', userCalendars.data);

Filter by Creation Date

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

// Get calendars created in the last 7 days
const sevenDaysAgo = new Date();
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);

const recentCalendars = await client.calendar.list({
  created_at__gte: sevenDaysAgo
});

console.log('Recent calendars:', recentCalendars.data.length);

Pagination

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

let cursor: string | undefined;
const allCalendars = [];

do {
  const response = await client.calendar.list({ cursor });
  allCalendars.push(...response.data);
  cursor = response.next_cursor;
} while (cursor);

console.log('Total calendars across all pages:', allCalendars.length);

Combined Filters

import { RecallClient } from '@recall-ai/sdk';

const client = new RecallClient({
  apiKey: 'your-api-key'
});

// Get connected Google calendars created in the last month
const oneMonthAgo = new Date();
oneMonthAgo.setMonth(oneMonthAgo.getMonth() - 1);

const filteredCalendars = await client.calendar.list({
  platform: 'google_calendar',
  status: 'connected',
  created_at__gte: oneMonthAgo
});

console.log('Filtered calendars:', filteredCalendars.data);

Error Handling

try {
  const calendars = await client.calendar.list({
    status: 'connected'
  });
  console.log('Calendars:', calendars.data);
} catch (error) {
  console.error('Failed to list calendars:', error.message);
}

Notes

  • All filter parameters are optional
  • You can combine multiple filters to narrow down results
  • Use pagination for large result sets to avoid timeouts
  • The created_at__gte parameter accepts JavaScript Date objects

Build docs developers (and LLMs) love