CorebanqCorebanq Developer Docs
Counterpartiesv1Counterparty Bank Accounts

Delete counterparty bank account (soft delete)

Handler: DeleteBankAccount → DeleteBankAccountSrv. Soft-deletes: sets active=false and keeps the row (preserved for transfer history); the cp_accounts link row is NOT removed. Deleting (deactivating) a bank account that is already inactive requires the caller to hold the Internal role; otherwise the row is treated as not found and returns 404 Not Found. This check is enforced atomically inside the transaction via a row lock (SELECT ... FOR UPDATE). Returns 204 on success.

DELETE
/v1/counterparties/bank-accounts/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Counterparty bank account ID.

id*string

id path parameter

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/counterparties/bank-accounts/string"
Empty
{
  "status": 400,
  "message": "Invalid input"
}
{
  "status": 401,
  "message": "Unauthorized"
}
{
  "status": 403,
  "message": "Forbidden"
}
{
  "status": 404,
  "message": "Not found"
}
{
  "status": 500,
  "message": "server_error"
}