# Delete bank details

`DELETE /api/configuration/bank-details/{sortCode}`

- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Delete bank details](https://support.gladstonesoftware.cloud/reference/configuration/delete-bank-details)

## Overview

Removes a bank from the tenant's list of banks — the reference record holding a sort code together with the bank's name, branch and address. This is a hard delete: the bank is removed outright. There is no active or deleted flag on a bank record, so there is no deactivate alternative; to restore one you create it again with [Create bank details](create-bank-details.md).

The only check made before the delete is that the sort code exists. **Nothing stops you deleting a bank that member bank accounts still use.** Member bank accounts hold the sort code independently of the bank list, so the delete succeeds, the accounts keep their sort code, and they simply stop resolving to a bank name and address. Check first with your own reporting if that matters — the API will not warn you.

A successful call returns `204 No Content` with an empty body, and the next read of the bank list reflects the change. Repeating the call returns `404`, not a silent no-op.

## Endpoint

`DELETE {base_url}/api/configuration/bank-details/{sortCode}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `sortCode` | string | Yes | The sort code of the bank to delete — unique within your tenant, up to 6 characters, as returned in `[].sortCode` by [List bank details](get-all-bank-details.md). The stored value is compared exactly, with no normalisation, so send it in the form it was created in. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/bank-details/{sortCode}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `sortCode` is empty — `SortCode {sortCode} cannot be null or empty`. A request with no sort code segment at all does not reach this endpoint, so you will rarely see this. |
| `404` | Not found | No bank holds that sort code — `The bank detail with sort code {sortCode} does not exist.` You also get this on a repeat call, once the first has succeeded. |
| `500` | Internal server error | The delete failed with an unexpected server-side error. Nothing is removed, and the request is safe to retry. |
