Override update to:
- Upsert the org's GoogleCalendarServiceAccount when google_service_account is present in the request body (create-or-update, one per org, calendar FK=None).
- Trigger rooms sync when should_sync_rooms flips False→True — but only when a service account is configured (either already stored or just provided in this PATCH). If the flag is being enabled and no service account is configured (neither stored nor in the request), return 400 so the admin knows to configure first.
Uses select_for_update to lock the row during snapshot + write, serializing concurrent PATCHes and preventing double-fire of the sync on False→True transition.
The creds check is performed BEFORE any write so that unrelated field changes (e.g. renaming the org) are NOT persisted when the 400 is returned.
Request
- The document declares no server URL.
- Auth: one of:
- HTTP bearer
- API key in cookie sessionid
Path parameters
Headers
Selects the active organization for this request. Optional for callers that belong to exactly one active organization — the single membership is resolved implicitly. Required when the caller has two or more active memberships; omitting it in that case returns 400. If the header names an organization the caller is not an active member of, the server returns 403.
Request body
Response
Changes
- ▲
the request property
became not nullable (media type: application/json) - ▲
the request property
became not nullable (media type: application/x-www-form-urlencoded) - ▲
the request property
became not nullable (media type: multipart/form-data)
- ▲
- ○
added the new optional request property
(media type: application/json) - ○
added the new optional request property
(media type: application/x-www-form-urlencoded) - ○
added the new optional request property
(media type: multipart/form-data) - ○
added the optional property
to the response with the status
- ○