{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/legal_entity_create_request",
  "title": "legal_entity_create_request",
  "type": "object",
  "properties": {
    "legal_entity_type": {
      "type": "string",
      "enum": [
        "business",
        "individual"
      ],
      "description": "The type of legal entity."
    },
    "risk_rating": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "nullable": true,
      "description": "The risk rating of the legal entity. One of low, medium, high."
    },
    "prefix": {
      "type": "string",
      "nullable": true,
      "description": "An individual's prefix."
    },
    "first_name": {
      "type": "string",
      "nullable": true,
      "description": "An individual's first name."
    },
    "middle_name": {
      "type": "string",
      "nullable": true,
      "description": "An individual's middle name."
    },
    "last_name": {
      "type": "string",
      "nullable": true,
      "description": "An individual's last name."
    },
    "suffix": {
      "type": "string",
      "nullable": true,
      "description": "An individual's suffix."
    },
    "preferred_name": {
      "type": "string",
      "nullable": true,
      "description": "An individual's preferred name."
    },
    "citizenship_country": {
      "type": "string",
      "nullable": true,
      "description": "The country of citizenship for an individual."
    },
    "politically_exposed_person": {
      "type": "boolean",
      "nullable": true,
      "description": "Whether the individual is a politically exposed person."
    },
    "date_of_birth": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "An individual's date of birth (YYYY-MM-DD)."
    },
    "date_formed": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "A business's formation date (YYYY-MM-DD)."
    },
    "business_name": {
      "type": "string",
      "nullable": true,
      "description": "The business's legal business name."
    },
    "doing_business_as_names": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A list of \"Doing Business As\" (DBA) / trade names for a business, different than their legal business name."
      }
    },
    "legal_structure": {
      "type": "string",
      "enum": [
        "corporation",
        "llc",
        "non_profit",
        "partnership",
        "sole_proprietorship",
        "trust"
      ],
      "nullable": true,
      "description": "The business's legal structure."
    },
    "phone_numbers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "phone_number": {
            "type": "string"
          }
        },
        "description": "A list of phone numbers in E.164 format."
      }
    },
    "email": {
      "type": "string",
      "nullable": true,
      "description": "The entity's primary email."
    },
    "website": {
      "type": "string",
      "nullable": true,
      "description": "The entity's primary website URL."
    },
    "business_description": {
      "type": "string",
      "nullable": true,
      "description": "A description of the business."
    },
    "intended_use": {
      "type": "string",
      "nullable": true,
      "description": "A description of the intended use of the legal entity."
    },
    "expected_activity_volume": {
      "type": "integer",
      "nullable": true,
      "description": "Monthly expected transaction volume in USD."
    },
    "country_of_incorporation": {
      "type": "string",
      "nullable": true,
      "description": "The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats."
    },
    "operating_jurisdictions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes)."
    },
    "primary_social_media_sites": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of primary social media URLs for the business."
    },
    "listed_exchange": {
      "type": "string",
      "nullable": true,
      "description": "ISO 10383 market identifier code."
    },
    "ticker_symbol": {
      "type": "string",
      "nullable": true,
      "description": "Stock ticker symbol for publicly traded companies."
    },
    "regulators": {
      "type": "array",
      "nullable": true,
      "items": {
        "$ref": "#/components/schemas/legal_entity_regulator"
      },
      "description": "Array of regulatory bodies overseeing this institution."
    },
    "third_party_verification": {
      "$ref": "#/components/schemas/third_party_verification",
      "nullable": true,
      "deprecated": true,
      "description": "Deprecated. Use `third_party_verifications` instead."
    },
    "third_party_verifications": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/third_party_verification"
      },
      "description": "A list of third-party verifications run by external vendors.",
      "title": "Third Party Verfications"
    },
    "service_provider_legal_entity_id": {
      "type": "string",
      "format": "uuid",
      "nullable": true,
      "description": "The UUID of the parent legal entity in the service provider tree."
    },
    "metadata": {
      "type": "object",
      "description": "Additional data represented as key-value pairs. Both the key and value must be strings.",
      "additionalProperties": {
        "type": "string"
      },
      "example": {
        "key": "value",
        "foo": "bar",
        "modern": "treasury"
      }
    },
    "external_id": {
      "type": "string",
      "nullable": true,
      "description": "An optional user-defined 180 character unique identifier."
    },
    "bank_settings": {
      "$ref": "#/components/schemas/legal_entity_bank_setting",
      "nullable": true
    },
    "wealth_and_employment_details": {
      "$ref": "#/components/schemas/legal_entity_wealth_employment_detail",
      "nullable": true
    },
    "compliance_details": {
      "type": "object",
      "nullable": true,
      "deprecated": true
    },
    "addresses": {
      "type": "array",
      "description": "A list of addresses for the entity.",
      "items": {
        "$ref": "#/components/schemas/legal_entity_address_create_request"
      }
    },
    "identifications": {
      "type": "array",
      "description": "A list of identifications for the legal entity.",
      "items": {
        "$ref": "#/components/schemas/identification_create_request"
      }
    },
    "documents": {
      "type": "array",
      "description": "A list of documents to attach to the legal entity (e.g. articles of incorporation, certificate of good standing, proof of address).",
      "items": {
        "type": "object",
        "properties": {
          "document_type": {
            "type": "string",
            "enum": [
              "articles_of_incorporation",
              "certificate_of_good_standing",
              "ein_letter",
              "generic",
              "identification_back",
              "identification_front",
              "proof_of_address"
            ],
            "description": "A category given to the document, can be `null`."
          },
          "file_data": {
            "type": "string",
            "description": "Base64-encoded file content for the document."
          },
          "filename": {
            "type": "string",
            "description": "The original filename of the document."
          }
        },
        "required": [
          "document_type",
          "file_data"
        ]
      }
    },
    "industry_classifications": {
      "type": "array",
      "description": "A list of industry classifications for the legal entity.",
      "items": {
        "$ref": "#/components/schemas/legal_entity_industry_classification"
      }
    },
    "legal_entity_associations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/legal_entity_association_inline_create_request"
      },
      "nullable": true,
      "description": "The legal entity associations and its child legal entities."
    },
    "connection_id": {
      "type": "string",
      "nullable": true,
      "description": "The connection ID for the connection the legal entity is associated with. Defaults to the id of the connection designated with an is_default value of true or the id of an existing operational connection if only one is available. Pass in a value of null to prevent the connection from being associated with the legal entity."
    }
  },
  "required": [
    "legal_entity_type"
  ]
}