---
title: "Sync User Google Calendars"
method: POST
path: "/calendars/google-calendars/sync"
tags: ["Calendar"]
---

# Sync User Google Calendars

`POST /calendars/google-calendars/sync`

Sync Google calendars for a user.

Fetches all calendars from the specified user's Google account and:
1. Creates/updates GoogleCalendar records in the database
2. Creates/updates corresponding Calendar records
3. Deletes calendars that no longer exist in Google

- **user_id**: Optional user ID to sync calendars for. If not provided, syncs current user's calendars.

Returns the list of synced calendars.

## Query parameters

- `user_id` string, uuid, nullable — Optional user ID to sync calendars for. If not provided, syncs current user's calendars.

## Response `200`

Successful Response

- SyncGoogleCalendarsResponse — Response model for syncing Google Calendars
  - `message` string, required
  - `synced_count` integer, required
  - `calendars` AppCalendarSchemasGoogleCalendarItem[], required
    - `google_calendar_id` string, uuid, required
    - `google_calendar_unique_name` string, required
    - `calendar_id` string, uuid, nullable, required
    - `summary` string, nullable, required
    - `description` string, nullable, required
    - `time_zone` string, nullable, required
    - `primary_calendar` boolean, required
    - `access_role` string, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/openintake/apis/fastapi.md) · [All operations](https://skmtc.dev/openintake/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintake/fastapi/revisions/4a81645b59f6/schema)
