organizations

Create a new organization for the authenticated user.

Overrides CreateModelMixin.create to handle the post-write refetch correctly for members who already have one or more memberships.

We skip the base mixin's post-write resolve_organization call entirely. For the create action — exempted via organization_optional_actions = ("mine", "create") — that re-resolve would leave a multi-org caller with no X-Organization-Id header resolved to None, making get_queryset return nothing and causing the re-fetch to raise DoesNotExist / 500.

Instead, after perform_create we look up the just-created membership directly and stash it on the request so the re-fetch (via get_queryset) is scoped to the new organization -- and bind that organization to the context, which is the half of the base mixin's re-resolve that still applies here.

post/organizations{format}

Request

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

Path parameters

format'.json' required

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