---
title: "Manually trigger synchronization of user's Google Groups memberships."
method: POST
path: "/api/v1/user/me/google-groups/sync"
---

# Manually trigger synchronization of user's Google Groups memberships.

`POST /api/v1/user/me/google-groups/sync`

**Authentication**: JWT token required
**Access**: Users can trigger sync for their own Google Groups
**Purpose**: Force synchronization between user preferences and actual Google
Groups memberships

**Request**: No request body required - this is a POST endpoint

**Success Response Schema**:
```json
{
  "data": {
    "message": "Google Groups sync completed",
    "sync_results": {
      "user_email": "user@example.com",
      "trends_earth_users": {
        "action": "verified",
        "success": true,
        "current_member": true,
        "details": "Membership confirmed in Google Groups"
      },
      "trendsearth": {
        "action": "removed",
        "success": true,
        "current_member": false,
        "details": "User removed from group as requested"
      }
    }
  }
}
```

**Manual Sync Process**:
1. Checks Google Groups service availability
2. Reads current user preferences from database
3. Queries actual Google Groups memberships
4. Synchronizes memberships to match preferences
5. Returns detailed sync results

**Sync Actions Performed**:
- `added`: User added to Google Group
- `removed`: User removed from Google Group
- `verified`: Membership status confirmed as correct
- `skipped`: No action needed
- `failed`: Action attempted but failed

**Use Cases**:
- Verify current group memberships
- Recover from failed automatic sync
- Troubleshoot synchronization issues
- Force immediate sync after preference changes

**Service Dependency**:
- Requires Google Groups service to be available
- Returns service unavailable error if Google Groups down
- Handles temporary service outages gracefully

**Error Recovery**:
- Provides detailed error information
- Distinguishes between service and permission errors
- Suggests next steps for error resolution

**Error Responses**:
- `401 Unauthorized`: JWT token required
- `503 Service Unavailable`: Google Groups service not available
- `500 Internal Server Error`: Sync process failed

## Request body

- object

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
