{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/memo-bank/main/json-schema/memo-bank-account-schema.json",
  "title": "Account",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/memo-bank-accounts-api-openapi.yml#/components/schemas/Account",
  "required": [
    "balance",
    "currency",
    "iban",
    "id",
    "is_main",
    "name",
    "status",
    "type"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "ID of the account.",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Name of the account, as seen in the Memo Bank interface."
    },
    "status": {
      "type": "string",
      "description": "Status of the account.",
      "enum": [
        "active",
        "closed"
      ]
    },
    "balance": {
      "type": "integer",
      "description": "Balance of the account, in the smallest unit of the `currency`. It represents the **available** money on the account at the time of the request. Note that authorized overdrafts are not included in the balance.",
      "format": "int64"
    },
    "currency": {
      "type": "string",
      "description": "Currency of the account balance, in ISO 4217 format."
    },
    "iban": {
      "type": "string",
      "description": "Main IBAN of the account."
    },
    "type": {
      "type": "string",
      "description": "Type of the account.",
      "enum": [
        "current_account",
        "ring_fenced_account",
        "ring_fenced_credit_servicer_account",
        "settlement_account",
        "specially_dedicated_account",
        "trust_account",
        "meal_voucher_account",
        "booster_account",
        "dedicated_liquidity_account",
        "dedicated_recovery_account",
        "line_item_sub_account"
      ]
    },
    "is_main": {
      "type": "boolean",
      "description": "Flag indicating if this account is the main account of your workspace. "
    }
  }
}