{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/xero/main/json-schema/xero-new-account-feed-connections-request-schema.json",
  "title": "NewAccountFeedConnectionsRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xero-bank-feeds-v2-api-openapi.yml#/components/schemas/NewAccountFeedConnectionsRequest",
  "type": "object",
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "description": "Between 1 and 50 Feed Connections to create. No element may be null.",
      "items": {
        "$ref": "#/$defs/NewAccountFeedConnection"
      }
    }
  },
  "$defs": {
    "AccountType": {
      "type": "string",
      "description": "The high-level type of the account. `BANK` covers every account type other than a credit card.\n",
      "enum": [
        "BANK",
        "CREDITCARD"
      ]
    },
    "NewAccountFeedConnection": {
      "type": "object",
      "required": [
        "accountToken",
        "accountType",
        "accountNumber",
        "accountName",
        "currency"
      ],
      "properties": {
        "accountToken": {
          "type": "string",
          "maxLength": 50,
          "description": "The financial institute's identifier for the account. Must be unique within your\nfinancial institute.\n"
        },
        "accountType": {
          "$ref": "#/$defs/AccountType"
        },
        "accountNumber": {
          "type": "string",
          "maxLength": 40,
          "description": "The account number for the Xero Bank Account being created. Up to 40 characters when\n`accountType` is `BANK`. When `accountType` is `CREDITCARD`, supply only the last four\ndigits, and digits only.\n"
        },
        "accountName": {
          "type": "string",
          "maxLength": 30,
          "description": "The name for the Xero Bank Account being created. Rejected if the Organisation already\nholds an account with this name.\n"
        },
        "currency": {
          "type": "string",
          "minLength": 3,
          "maxLength": 3,
          "description": "ISO-4217 currency code. Must be a currency the Organisation holds."
        },
        "country": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "description": "ISO-3166 alpha-2 country code. Required only when the Application supports multiple\nregions.\n"
        }
      }
    }
  }
}