> ## 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.

# Remove workspace members in bulk

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

Removes up to 200 people from a workspace at once, the same way as [Remove workspace member](/api-reference/remove-workspace-member).

Removing someone takes away their access to the workspace and its apps right away:

- Apps they own move to the workspace owner, and their webhooks go to the owner too.
- Their personal access tokens for the workspace are deleted, and integrations they connected in the workspace are disconnected.
- They leave every custom group.
- If this was the last workspace they could sign in to, their Base44 account is disabled.

Removing someone whose invitation is still pending cancels the invitation.

You can't remove yourself or the workspace owner.

Every item is checked before anything changes. If any item can't be applied, nothing changes and the request returns a `400` whose `detail.errors` lists each rejected item with its `email`, a `message`, and an `error_code` when there is one. A member who isn't in the workspace, or a change you couldn't make on the single-member endpoint, is reported there rather than as a `403` or `404`. A `200` lists every person removed in `results`, in request order. Retrying a request that succeeded returns a `400` listing those people as not found.

People are handled one at a time before any membership is deleted. If a `409` stops the request, nobody is removed, but the people handled before the blocked one have already lost their app access and personal access tokens. Send the request again once the block clears.

This is limited to 5 requests per minute, shared by [Update workspace member roles in bulk](/api-reference/update-workspace-member-roles-in-bulk), [Remove workspace members in bulk](/api-reference/remove-workspace-members-in-bulk), and [Set member credit limits in bulk](/api-reference/set-member-credit-limits-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, and workspace API keys aren't accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/workspace/members/bulk/remove
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/members/bulk/remove:
    post:
      summary: Remove workspace members in bulk
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Removes up to 200 people from a workspace at once, the same way as
        [Remove workspace member](/api-reference/remove-workspace-member).


        Removing someone takes away their access to the workspace and its apps
        right away:


        - Apps they own move to the workspace owner, and their webhooks go to
        the owner too.

        - Their personal access tokens for the workspace are deleted, and
        integrations they connected in the workspace are disconnected.

        - They leave every custom group.

        - If this was the last workspace they could sign in to, their Base44
        account is disabled.


        Removing someone whose invitation is still pending cancels the
        invitation.


        You can't remove yourself or the workspace owner.


        Every item is checked before anything changes. If any item can't be
        applied, nothing changes and the request returns a `400` whose
        `detail.errors` lists each rejected item with its `email`, a `message`,
        and an `error_code` when there is one. A member who isn't in the
        workspace, or a change you couldn't make on the single-member endpoint,
        is reported there rather than as a `403` or `404`. A `200` lists every
        person removed in `results`, in request order. Retrying a request that
        succeeded returns a `400` listing those people as not found.


        People are handled one at a time before any membership is deleted. If a
        `409` stops the request, nobody is removed, but the people handled
        before the blocked one have already lost their app access and personal
        access tokens. Send the request again once the block clears.


        This is limited to 5 requests per minute, shared by [Update workspace
        member roles in
        bulk](/api-reference/update-workspace-member-roles-in-bulk), [Remove
        workspace members in
        bulk](/api-reference/remove-workspace-members-in-bulk), and [Set member
        credit limits in bulk](/api-reference/set-member-credit-limits-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, and workspace API keys
        aren't accepted.</Note>
      operationId: bulk_remove_members_api_workspace_members_bulk_remove_post
      parameters:
        - name: workspaceId
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            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: Workspaceid
          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/BulkRemoveMembersRequest'
      responses:
        '200':
          description: Everyone was removed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkMemberOperationResponse'
        '400':
          description: >-
            At least one item can't be applied, and nothing changed.
            `detail.errors` lists each one.
          content:
            application/json:
              example:
                detail:
                  message: Some members could not be updated. No changes were applied.
                  errors:
                    - email: sam@acme.com
                      error_code: MEMBER_NOT_FOUND
                      message: >-
                        Member sam@acme.com not found in workspace
                        67e0b12c4d8a3f005b21c9e4
        '401':
          description: Missing or invalid credentials.
        '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: >-
            Your workspace requires an unlocked SSO session, or an app the
            person owns can't move to the owner right now: an ownership transfer
            is being accepted, a Google Business profile is being created, or
            the workspace has no active owner.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    BulkRemoveMembersRequest:
      properties:
        emails:
          items:
            type: string
          type: array
          maxItems: 200
          minItems: 1
          title: Emails
          description: >-
            Emails of the members or pending invitees to remove, 1 to 200,
            exactly as `email` in [List workspace
            members](/api-reference/list-workspace-members) returns them. Each
            email can appear once.
          example:
            - dana@acme.com
            - sam@acme.com
      type: object
      required:
        - emails
      title: BulkRemoveMembersRequest
      description: People to remove in one request.
    BulkMemberOperationResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/BulkMemberResult'
          type: array
          title: Results
          description: One entry per item, in request order.
          example:
            - email: dana@acme.com
              message: Member role updated to editor.
              status: success
      type: object
      required:
        - results
      title: BulkMemberOperationResponse
      description: The outcome of each item.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BulkMemberResult:
      properties:
        email:
          type: string
          title: Email
          description: Email of the member.
          example: dana@acme.com
        status:
          type: string
          enum:
            - success
            - skipped
          title: Status
          description: >-
            `success` when the change was applied, `skipped` when the member
            changed while the request ran and nothing was applied.
          default: success
          example: success
        message:
          type: string
          title: Message
          description: Short explanation. Its wording can change, so don't parse it.
          example: Member role updated to editor.
      type: object
      required:
        - email
        - status
        - message
      title: BulkMemberResult
      description: What happened to one item.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  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.