{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-organization-bank-account-create-request-dto-schema.json",
  "title": "OrganizationBankAccountCreateRequestDto",
  "description": "Create a bank account",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-funding-accounts-api-openapi.yml#/components/schemas/OrganizationBankAccountCreateRequestDto",
  "required": [
    "bankName",
    "nameOnAccount",
    "ownerType",
    "type"
  ],
  "type": "object",
  "properties": {
    "nameOnAccount": {
      "minLength": 1,
      "type": "string",
      "description": "Full name on bank account"
    },
    "routingNumber": {
      "type": "string",
      "description": "Bank routing number. This field is required."
    },
    "accountNumber": {
      "type": "string",
      "description": "Bank account number. This field is required."
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountType"
        },
        {
          "description": "Bank account type"
        }
      ]
    },
    "ownerType": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountOwnerType"
        },
        {
          "description": "Bank account owner type"
        }
      ]
    },
    "bankName": {
      "maxLength": 100,
      "minLength": 1,
      "type": "string",
      "description": "Bank name. Set this field as a nickname for your bank account."
    },
    "accessToAdmins": {
      "type": "boolean",
      "description": "Set as `true` to enable access to all users with the `ADMINISTRATOR` user role"
    },
    "chartOfAccountId": {
      "type": "string",
      "description": "BILL-generated ID of the chart of accounts for the bank account. The value begins with `0ca`."
    }
  },
  "$defs": {
    "BankAccountOwnerType": {
      "type": "string",
      "description": "BankAccountOwnerType Enum.",
      "enum": [
        "BUSINESS",
        "PERSONAL"
      ]
    },
    "BankAccountType": {
      "type": "string",
      "description": "BankAccountType Enum.",
      "enum": [
        "CHECKING",
        "SAVINGS"
      ]
    }
  }
}