Update current user's Google Groups preferences and trigger synchronization.
Authentication: JWT token required Access: Users can update their own Google Groups preferences Purpose: Change opt-in preferences and sync with Google Groups service
Request Schema:
{
"preferences": {
"trends_earth_users": true,
"trendsearth": false
}
}
Request Fields:
- preferences: Object containing group opt-in preferences
- trends_earth_users: Boolean for general user community
- trendsearth: Boolean for platform-specific group
- Only valid group keys accepted
Success Response Schema:
{
"data": {
"message": "Google Groups preferences updated successfully",
"updated_groups": ["trends_earth_users"],
"preferences": {
"trends_earth_users": true,
"trendsearth": false
},
"sync_results": {
"user_email": "user@example.com",
"trends_earth_users": {
"action": "added",
"success": true,
"current_member": true
},
"trendsearth": {
"action": "no_change",
"success": true,
"current_member": false
}
}
}
}
Update Process:
- Validates request data and group keys
- Updates user preferences in database
- Triggers synchronization with Google Groups service
- Returns updated preferences and sync results
- Handles partial sync failures gracefully
Sync Actions:
- added: User was added to the Google Group
- removed: User was removed from the Google Group
- no_change: User membership unchanged
- verified: Membership status confirmed
Preference Validation:
- Only accepts valid group keys
- Boolean values required for all preferences
- Partial updates not supported - must specify all groups
Error Handling:
- Preferences saved even if sync fails
- Sync errors reported in response
- User can retry sync separately
- Service availability checked before sync
Error Responses:
- 400 Bad Request: Invalid preferences data or group keys
- 401 Unauthorized: JWT token required
- 500 Internal Server Error: Failed to update preferences or sync
put/api/v1/user/me/google-groups
Request body
object required
Response
Success
object required
Changes
No recorded changes to this endpoint across all 1 revision of this API.