---
agentTools:
  projectIndex: https://docs.o21.io/llms.txt
---

# List Accounts

List of accounts declared

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "O21Pay API Reference",
    "summary": "O21Pay API Reference",
    "description": "O21Pay API Reference",
    "version": "1.0.0"
  },
  "paths": {
    "/accounts": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Accounts",
        "description": "List of accounts declared",
        "parameters": [
          {
            "name": "clientid",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "secret",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "array": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Account"
                      },
                      "description": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Check the parameters or the syntax"
          },
          "401": {
            "description": "Unauthorized Couldn’t authenticate the request"
          }
        }
      }
    }
  },
  "security": [],
  "servers": [
    {
      "url": "https://o21c.obvious21.com/api/v1",
      "description": ""
    },
    {
      "url": "https://sandbox-o21c.obvious21.com/api/v1",
      "description": ""
    }
  ],
  "components": {
    "schemas": {
      "Account": {
        "title": "Account",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Account ID"
          },
          "name": {
            "type": "string",
            "description": "Currency Name"
          },
          "shortname": {
            "type": "string",
            "description": "Currency Shortname"
          },
          "currency_code": {
            "type": "string",
            "description": "Currency Code"
          },
          "decimals": {
            "type": "number",
            "description": "Number of decimals"
          },
          "chainid": {
            "type": "string",
            "description": "Chain ID"
          },
          "testnet": {
            "type": "boolean",
            "description": "Network TESTNET or MAINNET"
          },
          "time": {
            "type": "number",
            "description": "Time in seconds. Value -1 = No Timeout"
          },
          "account1": {
            "type": "string",
            "description": "IBAN or Wallet Address"
          },
          "contract": {
            "type": "string",
            "description": "Only if Currency is Crypto"
          },
          "bank": {
            "$ref": "#/components/schemas/Wire"
          }
        }
      },
      "Wire": {
        "type": "object",
        "properties": {
          "bank": {
            "type": "string",
            "description": "Bank Name"
          },
          "company": {
            "type": "string",
            "description": "Company Name"
          },
          "iban": {
            "type": "string",
            "description": "IBAN number"
          },
          "bic": {
            "type": "string",
            "description": "BIC/SWIFT number"
          },
          "wire": {
            "type": "boolean",
            "enum": [
              true,
              false
            ],
            "description": "manual Wire accepted"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "Accounts (Account Number, IBAN, Wallet Address)"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 26,
      "2": 207,
      "3": 68,
      "4": 10,
      "5": 95,
      "6": 186,
      "7": 0,
      "8": 31,
      "9": 209,
      "10": 87,
      "11": 132
    }
  }
}
```