organizations

Override update to:

  1. Upsert the org's GoogleCalendarServiceAccount when google_service_account is present in the request body (create-or-update, one per org, calendar FK=None).
  2. 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.

put/organizations/{id}/

Request

  • The document declares no server URL.
  • Auth: one of:
    • HTTP bearer
    • API key in cookie sessionid

Path parameters

idstring required

Headers

X-Organization-Idstring

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

idinteger required
namestring required
slugstring

Public, URL-safe identifier used by the organization's branded login page and by brandingForTenant. Always set: an organization saved without one is given an opaque org-<token> slug, and the database refuses a blank value. Mutable, but not clearable -- changing it orphans previously-issued branded login URLs, which then fall back to the default identity rather than erroring. Format, reserved-word, and confusable-character rules live in organizations.slug_validation and are enforced by each write surface (REST serializer, admin form, GraphQL input), not on the model.

should_sync_roomsboolean

Whether to sync rooms for this organization.

external_event_update_policy'allow' | 'change_request' | 'forbidden'
  • allow - Allow direct updates
  • change_request - Updates create change requests
  • forbidden - Updates are forbidden
week_start'monday' | 'sunday'
  • monday - Monday
  • sunday - Sunday
google_service_accountobject nullable required

Return read-only service account info (no secrets), or None if unconfigured.

can_invite_organizationsboolean required

Whether this organization can invite/create other organizations. DB/Django-admin only — never exposed via any API. Enables the whole reseller capability bundle.

createdstring date-time required
modifiedstring date-time required

Response

idinteger required
namestring required
slugstring

Public, URL-safe identifier used by the organization's branded login page and by brandingForTenant. Always set: an organization saved without one is given an opaque org-<token> slug, and the database refuses a blank value. Mutable, but not clearable -- changing it orphans previously-issued branded login URLs, which then fall back to the default identity rather than erroring. Format, reserved-word, and confusable-character rules live in organizations.slug_validation and are enforced by each write surface (REST serializer, admin form, GraphQL input), not on the model.

should_sync_roomsboolean

Whether to sync rooms for this organization.

external_event_update_policy'allow' | 'change_request' | 'forbidden'
  • allow - Allow direct updates
  • change_request - Updates create change requests
  • forbidden - Updates are forbidden
week_start'monday' | 'sunday'
  • monday - Monday
  • sunday - Sunday
google_service_accountobject nullable required

Return read-only service account info (no secrets), or None if unconfigured.

can_invite_organizationsboolean required

Whether this organization can invite/create other organizations. DB/Django-admin only — never exposed via any API. Enables the whole reseller capability bundle.

createdstring date-time required
modifiedstring date-time required

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