> Toden documentation. For the full index fetch /llms.txt. Every page is available as Markdown by appending .md to its URL. Every endpoint is under /api/v1. Identity verification and Risk Intelligence are separate contracts there with different error shapes; /api/kyc and /api/identity are older prefixes that still answer the same. Never invent an endpoint, field or enum value: read the API reference page for the operation first.

# List banks for the bank account step

GET https://sandbox-api.toden.co/api/v1/bank-account/banks

The banks the applicant can pick on a workflow's bank account step, with the `code` to send as `bankAccount.bankCode` on `POST /api/v1/verify`, and the fields the step asks for in that country. The same answer as `GET /api/v1/checks/bank_account/banks`, for a publishable key or a hosted session token. Free: it is a list, not a check. The SDKs call it for you.

**Error codes**

| `error` | Status | Meaning |
|---|---|---|
| `invalid_input` | 400 | country is not NG, KE or ZA. |
| `feature_disabled` | 403 | Bank account verification is not switched on for your organisation. |
| `banks_unavailable` | 503 | The list of banks could not be read right now. |
| `environment_mismatch` | 403 | The key belongs to an environment this deployment does not serve. |
| `origin_not_allowed` | 403 | The publishable key has an origin allowlist and the request origin is not on it. |
| `ip_not_allowed` | 403 | The secret key has an IP allowlist and the calling address is not on it. |
| `organization_suspended` | 403 | The organisation is suspended. The response carries `reason` and `suspendedAt`. |
| `business_not_approved` | 403 | A live key was used before the business was approved for production. |

A missing or unknown key answers `401`, where `error` is a short sentence rather than a code.

Accepts a publishable (`pk_`) or secret (`sk_`) key.

Reference: https://docs.toden.co/api-reference/verification/verifications/list-workflow-banks

## Authentication

- `Authorization` header (bearer token, required) — Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required. A scoped publishable key has Verification flow access, the fixed set `flow.run`, `flow.config.read` and `verifications.status.read`; a scoped secret key reaches what its scopes allow.

## Servers

- `https://sandbox-api.toden.co` (Sandbox, default)
- `https://api.toden.co` (Production)

## Request

### Query parameters

- `country` (enum, required) — The country. Required.
  - Allowed values: `NG`, `KE`, `ZA`
- `holder` (enum, optional, default: person) — Who the account belongs to, for `fields`.
  - Allowed values: `person`, `business`

## Response

### 200

The banks.

- `country` (string, required) — The country.
- `banks` (list of ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaBanksItems, required)
- `fields` (list of ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaFieldsItems, optional) — The fields a check needs in this country for the holder (`holder=person` or `business`), in order: the account number everywhere; in South Africa also the account type and the holder's ID number (a person) or company registration number (a business).

## Errors

### 400 Bad Request Error

The request body, query or path was invalid.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 401 Unauthorized Error

The Authorization header is missing, or the API key is unknown or revoked.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 403 Forbidden Error

The key may not call this endpoint, or the organisation may not use this feature.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

### 503 Service Unavailable Error

The service is temporarily unavailable.

- `error` (string, required) — A stable machine-readable code such as `invalid_input`. Authentication failures (401) carry a short sentence here instead of a code.
- `message` (string, optional) — A human-readable explanation, safe to log. The wording may change.

## Types

### ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaBanksItems

- `code` (string, required) — Send as bankCode.
- `name` (string, required) — The bank.
- `logo` (string, required, nullable) — A public URL of the bank's logo (PNG, at most 96 pixels a side), or null when Toden has none. Needs no API key, so an image tag can show it.
- `logoColor` (string, required, nullable) — The colour the logo is known by, as #rrggbb, for drawing around it. Null when there is no logo.

### ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaFieldsItems

- `key` (enum, required) — The request field.
  - Allowed values: `accountNumber`, `accountType`, `idNumber`, `registrationNumber`
- `label` (string, required) — What to call it.
- `kind` (enum, required) — `digits`, `text` or `select`.
  - Allowed values: `digits`, `text`, `select`
- `minLength` (integer, optional)
- `maxLength` (integer, optional)
- `options` (list of ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaFieldsItemsOptionsItems, optional)
- `placeholder` (string, optional) — An example.
- `hint` (string, optional) — A line to show under the field.

### ApiV1BankAccountBanksGetResponsesContentApplicationJsonSchemaFieldsItemsOptionsItems

- `value` (string, optional) — Send this.
- `label` (string, optional) — Show this.

## Examples

**Response**

```json
{
  "country": "string",
  "banks": [
    {
      "code": "string",
      "name": "string",
      "logo": "string",
      "logoColor": "string"
    }
  ],
  "fields": [
    {
      "key": "accountNumber",
      "label": "string",
      "kind": "digits",
      "minLength": 1,
      "maxLength": 1,
      "options": [
        {
          "value": "string",
          "label": "string"
        }
      ],
      "placeholder": "string",
      "hint": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://sandbox-api.toden.co/api/v1/bank-account/banks"

querystring = {"country":"NG"}

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG';
const options = {method: 'GET', headers: {Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.toden.co/api/v1/bank-account/banks?country=NG")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```