---
title: "Add a bank account"
method: POST
path: "/gateway/bank-accounts"
tags: ["Bank Accounts"]
---

# Add a bank account

`POST /gateway/bank-accounts`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/bank-accounts`
- Auth: API key in header `x-api-key`

Save a bank account for the business. Where the bank offers a name check, it runs at once: a clear mismatch is saved but never paid, and `payableReason` says so. Needs a live key. For a platform acting on a business it manages, bank accounts by API must have been opened for your platform; ask us. Every account added through a platform's key is emailed to the platform's owner and to the business's owner. The account number is never stored: we keep the last four characters and a hash.

## Request body

- CreateBankAccountParams
  - `currency` string, required: The payout currency. EUR and USD are supported.
  - `type` string, required: The account type from the requirements: `iban`, `sort_code`, `aba`.
  - `accountHolderName` string, required: The name on the bank account, as the bank holds it. A clear mismatch is saved but not paid.
  - `legalType` 'PRIVATE' | 'BUSINESS', required
  - `details` object, required: The fields the requirements asked for, for example `{ "IBAN": "DE89…" }`. Never stored: we keep the last four characters and a hash.

## Response `201`

The saved account, as a thin reference.

- BankAccount: A bank account as we keep it: a thin reference. The account number itself stays with our bank partner.
  - `id` string, uuid, required
  - `currency` string, required: Upper-case, `EUR` or `USD`.
  - `account_type` string, required: The corridor: `iban`, `sort_code`, `aba`.
  - `account_identifier_last4` string, required: The last four characters of the account number.
  - `account_holder_name` string, required
  - `legal_type` 'PRIVATE' | 'BUSINESS', required
  - `name_match_status` 'success' | 'partial' | 'failed' | 'unknown', required: How the holder name compared with the name the bank holds, where the bank offers that check (not for every currency). `failed` is never paid; `partial` and `unknown` are paid.
  - `active` boolean, required
  - `payable` boolean, required: Can the next payout go to this account right now: active, and the name check did not fail.
  - `payableReason` string, nullable, required: When `payable` is false: why, in a sentence for the merchant.

## Other responses

- `400`: The form was refused: `RECIPIENT_INVALID`, with one entry per field.
- `401`: Missing or invalid `x-api-key`.
- `403`: A test key (`live_key_required`); a business you do not manage (`You cannot act as this business.`); or, for a platform key, bank accounts by API not opened for your platform (`bank_accounts_by_api_closed`).

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
