LogoRecal
JS/TS SDK

Users

Learn how to manage users in Recal.

Understanding Users

Users represent individual people in your calendar system. They are the core entities that connect calendar accounts (Google Calendar, Microsoft Outlook) to Recal, enabling calendar access and event management. They can exist independently (User) or be associated with one or more organizations (Member).

Key Concepts:

  • Users have a custom string ID that you control (recommended to match your database)
  • One user can connect multiple calendar providers simultaneously
  • Users can be members of multiple organizations
  • All calendar operations are performed in the context of a specific User

User Management

Get User

// Get user information (basic)
const user = await recal.users.get('user_id')

// Or with additional data
const userWithDetails = await recal.users.get('user_id', {
    include: ['organizations', 'oauthConnections']
})

List All Users

// Get all users in your organization
const users = await recal.users.list()

Get User's Organizations

// Get all organizations a user belongs to
const organizations = await recal.users.getOrganizations('user_id')

Create User

// Create a new user (without organizations)
const user = await recal.users.create('user_id')

// Or with organization memberships
const userWithOrgs = await recal.users.create(
    'user_id',
    ['org-slug-1', 'org-slug-2']  // optional: organization slugs
)

Update User

// Update user ID
const updatedUser = await recal.users.update('old_user_id', 'new_user_id')

Delete User

// Deletes user from all organizations and removes associated OAuth connections
await recal.users.delete('user_id')

On this page