Skip to main content

Overview

Returns a list of all users who have connected their Google Calendar to your platform.

Authentication

Requires Platform API Key in the X-API-Key header.

Request

GET https://api.syncline.run/v1/platform/users

Response

{
  "users": [
    {
      "email": "alice@example.com",
      "google_id": "103847562910384756291",
      "connected_at": "2025-01-15T10:30:00Z",
      "preferences": {
        "work_hours": {
          "monday": { "enabled": true, "start": "09:00", "end": "17:00" }
        },
        "timezone": "America/New_York",
        "buffer_minutes": 15,
        "energy_pattern": "morning_person"
      }
    },
    {
      "email": "bob@example.com",
      "google_id": "209384756291038475629",
      "connected_at": "2025-01-16T14:20:00Z",
      "preferences": {
        "work_hours": {
          "monday": { "enabled": true, "start": "10:00", "end": "18:00" }
        },
        "timezone": "America/Los_Angeles",
        "buffer_minutes": 30,
        "energy_pattern": "afternoon_person"
      }
    }
  ],
  "total": 2
}

Response Fields

users
array
Array of connected users
  • email: User’s email address
  • google_id: Google account ID
  • connected_at: When they connected their calendar
  • preferences: Their scheduling preferences
total
integer
Total number of connected users

Use Cases

Monitor User Adoption

const { users, total } = await getConnectedUsers();

console.log(`${total} users have connected calendars`);

// Find recently connected users
const recentUsers = users.filter(u => {
  const connectedDate = new Date(u.connected_at);
  const daysAgo = (Date.now() - connectedDate) / (1000 * 60 * 60 * 24);
  return daysAgo <= 7;
});

console.log(`${recentUsers.length} new users this week`);

Analyze Preferences

const { users } = await getConnectedUsers();

// Find morning people
const morningPeople = users.filter(u =>
  u.preferences.energy_pattern === 'morning_person'
);

console.log(`${morningPeople.length} morning people`);

Check Single User Status

To check if a specific user is connected, use:
GET /v1/platform/users/status?email=alice@example.com
See Check User Status for details.