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

# removePlaidBankAccount

> Removes one Plaid-linked bank account and keeps the user's other accounts at that bank connected.

Removes a single Plaid-linked bank account from the user's Fluz account. Other enabled accounts under the same bank login stay connected and usable. Requires `MANAGE_PAYMENT` scope and a user access token.

When the removed account was the last enabled one under its bank login, Fluz also disconnects that bank login from Plaid. The response says which happened.

> [!NOTE]
>
> **Staging only**
>
> `removePlaidBankAccount` is currently available only in the staging environment at `https://transactional-graph.staging.fluzapp.com/api/v1/graphql`. It is not yet available in production, and this page will be updated when it is.

```graphql Schema signature theme={null}
mutation {
  removePlaidBankAccount(
    input: RemovePlaidBankAccountInput!
  ): RemovePlaidBankAccountResponse!
}
```

## Arguments

**input** `RemovePlaidBankAccountInput!` *required*

The bank account to remove and an optional reason. See [`RemovePlaidBankAccountInput`](https://docs.fluz.app/api-reference/types/remove-plaid-bank-account-input).

## Returns

[`RemovePlaidBankAccountResponse!`](https://docs.fluz.app/api-reference/types/remove-plaid-bank-account-response)

## Example

```graphql Request theme={null}
mutation RemovePlaidBankAccount($input: RemovePlaidBankAccountInput!) {
  removePlaidBankAccount(input: $input) {
    removed
    bankAccountId
    bankInstitutionAuthId
    remainingEnabledAccounts
    bankConnection
  }
}
```

```json Variables theme={null}
{
  "input": {
    "bankAccountId": "bank-account-id",
    "reason": "USER_REQUESTED"
  }
}
```

```json Response theme={null}
{
  "data": {
    "removePlaidBankAccount": {
      "removed": true,
      "bankAccountId": "bank-account-id",
      "bankInstitutionAuthId": "bank-institution-auth-id",
      "remainingEnabledAccounts": 1,
      "bankConnection": "STILL_CONNECTED"
    }
  }
}
```

## Behavior

* **Idempotent.** Removing an account that is already removed returns the same success response, and the account stays removed. A repeat call only retries any pending Plaid disconnect or scheduled-activity cancellation left over from an earlier call. Retrying is always safe.
* **The bank login is disconnected only when nothing is left.** `bankConnection` is `STILL_CONNECTED` while other enabled accounts remain, `DISCONNECTED` once the last one is removed and Plaid confirmed the disconnect, and `DISCONNECT_PENDING` when the last one is removed but the bank login could not be closed at Plaid yet. In that last case the account is still removed; call the mutation again to retry the disconnect.
* **Scheduled activity stops.** Fluz cancels recurring deposits and purchases funded by the removed account. If a cancellation can't complete, calling the mutation again retries it.
* **A removed account can't fund anything.** It no longer appears as a usable funding source and is rejected as a source for deposits or transfers.
* **To remove a whole bank login at once,** use [`removePlaidBankInstitution`](https://docs.fluz.app/api-reference/mutations/remove-plaid-bank-institution).

## Errors

Errors are returned in `errors[].extensions`. `code` identifies the error, `reason` carries the underlying cause for support, and `retryable` says whether calling again can succeed. Other fields such as `errorName`, `statusCode` and `userFriendly` are also present; branch on `code`, `reason` and `retryable`.

| `code` | `retryable` | Meaning |
| - | - | - |
| `PBA-0001` | no | This bank account isn't linked to this Fluz account, or isn't available to this application. Check the `bankAccountId`. |
| `PBA-0002` | no | The request is invalid. The message names the field, e.g. `reason` over 120 characters. |
| `PBA-0003` | yes | A temporary problem stopped this removal. Nothing was changed. |
| `PBA-0004` | yes | No response was received, so the removal can't be confirmed. Retrying is safe. |
| `PBA-0005` | yes | The bank connection service couldn't be reached. The account was not removed. |
| `PBA-0006` | yes | The bank connection for this account couldn't be verified. Nothing was changed. |
| `PBA-0007` | no | A configuration problem on Fluz's side stopped the request. Nothing was changed. Contact Fluz support. |

```json Error response theme={null}
{
  "errors": [
    {
      "message": "This bank account isn't linked to this Fluz account, or isn't available to this application. Check the bankAccountId.",
      "path": ["removePlaidBankAccount"],
      "extensions": {
        "errorName": "PlaidBankAccountNotFound",
        "code": "PBA-0001",
        "statusCode": 404,
        "userFriendly": true,
        "reason": "PLAID_BANK_ACCOUNT_NOT_FOUND",
        "retryable": false
      }
    }
  ],
  "data": null
}
```


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