{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alphabazaar-ai/json-schema/alphabazaar-ai-portfolio-exchange-request-schema.json",
  "title": "PortfolioExchangeRequest",
  "description": "Request to exchange public token and create portfolio",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alphabazaar-ai-portfolios-api-openapi.yml#/components/schemas/PortfolioExchangeRequest",
  "properties": {
    "public_token": {
      "type": "string",
      "maxLength": 500,
      "minLength": 10,
      "title": "Public Token"
    },
    "display_name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Display Name"
    },
    "account_id": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Account Id"
    },
    "institution_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Institution Name"
    }
  },
  "type": "object",
  "required": [
    "public_token",
    "display_name",
    "account_id"
  ]
}