> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Update workspace connector policies in bulk

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Changes the policies of up to 100 connectors in a workspace at once.

A connector policy has two switches. `builder_connection_enabled` decides whether builders can connect the connector to the workspace's apps. `per_user_connection_enabled` decides whether the apps' users can connect their own accounts through a workspace connector. Each action sets either switch, or both. Leave a switch out, or send `null`, to keep it.

Actions run in order, and each succeeds or fails on its own, so a `200` doesn't mean every action applied. Check `ok` on each result. A failed action changes nothing, except one that fails while saving: its first switch may already be saved, so read the policies again with [Get workspace connector policies](/api-reference/get-workspace-connector-policies).

Turning a switch off also stops apps from using connections already made that way, until it's turned back on. Owners of affected apps get a notification.

Changing policies here needs a plan that includes connector policies, for every connector.

This is limited to 60 requests per minute, shared by [Update builder connection policy](/api-reference/update-builder-connection-policy), [Update per-user connection policy](/api-reference/update-per-user-connection-policy), and [Update workspace connector policies in bulk](/api-reference/update-workspace-connector-policies-in-bulk). A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused. Workspace API keys aren't accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json put /api/workspace/{workspace_id}/connector-governance/bulk
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/workspace/{workspace_id}/connector-governance/bulk:
    put:
      summary: Update workspace connector policies in bulk
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Changes the policies of up to 100 connectors in a workspace at once.


        A connector policy has two switches. `builder_connection_enabled`
        decides whether builders can connect the connector to the workspace's
        apps. `per_user_connection_enabled` decides whether the apps' users can
        connect their own accounts through a workspace connector. Each action
        sets either switch, or both. Leave a switch out, or send `null`, to keep
        it.


        Actions run in order, and each succeeds or fails on its own, so a `200`
        doesn't mean every action applied. Check `ok` on each result. A failed
        action changes nothing, except one that fails while saving: its first
        switch may already be saved, so read the policies again with [Get
        workspace connector
        policies](/api-reference/get-workspace-connector-policies).


        Turning a switch off also stops apps from using connections already made
        that way, until it's turned back on. Owners of affected apps get a
        notification.


        Changing policies here needs a plan that includes connector policies,
        for every connector.


        This is limited to 60 requests per minute, shared by [Update builder
        connection policy](/api-reference/update-builder-connection-policy),
        [Update per-user connection
        policy](/api-reference/update-per-user-connection-policy), and [Update
        workspace connector policies in
        bulk](/api-reference/update-workspace-connector-policies-in-bulk). A
        signed-in session has its own limit, and every personal access token for
        the workspace shares one. Some workspaces have a different limit.


        <Note>Call this as an owner or admin of the workspace, with a personal
        access token for that workspace sent as a Bearer token, or from a
        signed-in session. A read-only token is refused. Workspace API keys
        aren't accepted.</Note>
      operationId: bulk_toggle_api_workspace__workspace_id__connector_governance_bulk_put
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the workspace. With a personal access token, use the token's
              workspace. Get it from `organization_id` in [Get
              app](/api-reference/get-app).
            title: Workspace Id
          description: >-
            ID of the workspace. With a personal access token, use the token's
            workspace. Get it from `organization_id` in [Get
            app](/api-reference/get-app).
          example: 67e0b12c4d8a3f005b21c9e4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkToggleRequest'
      responses:
        '200':
          description: The outcome of each action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkToggleResponse'
        '401':
          description: Missing or invalid credentials.
        '402':
          description: The workspace's plan doesn't include connector policies.
        '403':
          description: >-
            You aren't an owner or admin of the workspace, your token is for a
            different workspace or is read-only, or your credential can't be
            used on this endpoint.
        '409':
          description: The workspace requires an unlocked SSO session.
        '422':
          description: >-
            `actions` has more than 100 items, or an action has a missing or
            wrongly typed field.
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    BulkToggleRequest:
      properties:
        actions:
          items:
            $ref: '#/components/schemas/BulkToggleAction'
          type: array
          maxItems: 100
          title: Actions
          description: The changes, up to 100. An empty list changes nothing.
          example:
            - builder_connection_enabled: false
              integration_type: googlecalendar
            - builder_connection_enabled: true
              integration_type: slack
              per_user_connection_enabled: true
      type: object
      required:
        - actions
      title: BulkToggleRequest
      description: Policy changes to apply in order.
    BulkToggleResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/BulkToggleResult'
          type: array
          title: Results
          description: One result per action, in the order sent.
          example:
            - integration_type: googlecalendar
              item:
                builder_connection_enabled: false
                connector_mode: all
                display_name: Google Calendar
                has_per_user_credentials: false
                integration_type: googlecalendar
                not_yet_enabled: false
                per_user_connection_enabled: false
              ok: true
            - error: >-
                Cannot enable per-user connections without credentials
                configured.
              integration_type: slack
              ok: false
      type: object
      required:
        - results
      title: BulkToggleResponse
      description: The outcome of each action.
    BulkToggleAction:
      properties:
        integration_type:
          type: string
          title: Integration Type
          description: >-
            ID of the connector, from `integration_type` in [Get workspace
            connector
            policies](/api-reference/get-workspace-connector-policies).
          example: googlecalendar
        builder_connection_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Builder Connection Enabled
          description: >-
            Whether builders can connect the connector to the workspace's apps.
            Leave it out, or send `null`, to keep it.
          example: false
        per_user_connection_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Per User Connection Enabled
          description: >-
            Whether the apps' users can connect their own accounts through a
            workspace connector. Turning it on needs a workspace connector for
            the connector. Leave it out, or send `null`, to keep it.
          example: true
      type: object
      required:
        - integration_type
      title: BulkToggleAction
      description: The switches to set for one connector.
    BulkToggleResult:
      properties:
        integration_type:
          type: string
          title: Integration Type
          description: Connector the action was for.
          example: googlecalendar
        ok:
          type: boolean
          title: Ok
          description: Whether the action applied (`true`) or failed (`false`).
          example: false
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: >-
            Why the action failed, or `null` when `ok` is `true`. Its wording
            can change, so don't parse it.
          example: Cannot enable per-user connections without credentials configured.
        item:
          anyOf:
            - $ref: '#/components/schemas/ConnectorGovernanceItem'
            - type: 'null'
          description: >-
            The connector's policy after the action, or `null` when `ok` is
            `false`.
          example:
            builder_connection_enabled: false
            connector_mode: all
            display_name: Google Calendar
            has_per_user_credentials: false
            integration_type: googlecalendar
            not_yet_enabled: false
            per_user_connection_enabled: false
      type: object
      required:
        - integration_type
        - ok
      title: BulkToggleResult
      description: What happened to one action.
    ConnectorGovernanceItem:
      properties:
        integration_type:
          type: string
          title: Integration Type
          description: ID of the connector.
          example: googlecalendar
        display_name:
          type: string
          title: Display Name
          description: Name of the connector.
          example: Google Calendar
        connector_mode:
          type: string
          title: Connector Mode
          description: >-
            Which ways the connector can be connected. One of `all`,
            `shared_only`, `app_user_only`, `byo_shared_only`, or
            `byo_shared_and_app_user`, with the same meaning as `connector_mode`
            in [List connectors](/api-reference/list-connectors).
          example: all
        builder_connection_enabled:
          type: boolean
          title: Builder Connection Enabled
          description: >-
            Whether the workspace lets builders connect the connector to its
            apps (`true`) or has turned that off (`false`). When it's `false`,
            starting a connection is refused.
          example: true
        per_user_connection_enabled:
          type: boolean
          title: Per User Connection Enabled
          description: >-
            Whether the apps' users can connect their own accounts with the
            workspace's credentials (`true`) or not (`false`). Always `false`
            when `has_per_user_credentials` is `false`.
          example: false
        has_per_user_credentials:
          type: boolean
          title: Has Per User Credentials
          description: >-
            Whether the workspace has set up its own OAuth app credentials for
            the connector.
          example: false
        not_yet_enabled:
          type: boolean
          title: Not Yet Enabled
          description: >-
            Whether both switches are off only because the connector became
            available after the workspace chose to start new connectors off, and
            nobody has set its policy yet (`true`). Setting either switch makes
            it `false`.
          default: false
          example: false
      type: object
      required:
        - integration_type
        - display_name
        - connector_mode
        - builder_connection_enabled
        - per_user_connection_enabled
        - has_per_user_credentials
      title: ConnectorGovernanceItem
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.