> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracefinance.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an account

> Creates a new multi-currency account for the authenticated customer.



## OpenAPI

````yaml apis/fx-account/openapi.yml POST /v1/accounts
openapi: 3.1.1
info:
  title: FX Account API
  version: 1.0.0
  description: API for managing multi-currency accounts on the Trace Finance platform.
servers:
  - url: https://api.sandbox.tracefinance.com
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Accounts
    description: Create, list, and manage multi-currency accounts.
  - name: Beneficial owners
    description: Manage beneficial owners (UBOs) for company-owned accounts.
  - name: Funding instructions
    description: Retrieve funding instructions for depositing into an account.
  - name: Balances
    description: Retrieve fiat and crypto balances for an account.
paths:
  /v1/accounts:
    post:
      tags:
        - Accounts
      summary: Create an account
      description: Creates a new multi-currency account for the authenticated customer.
      operationId: createAccount
      parameters:
        - $ref: '#/components/parameters/TraceVersion'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountRequest'
            examples:
              company:
                summary: Company-owned account
                value:
                  assets:
                    - code: BRL
                      accountType: NAMED
                  owner:
                    type: COMPANY
                    legalName: Acme Ltda
                    taxId:
                      value: '11222333000181'
                      type: CNPJ
                    industry: SOFTWARE_DEVELOPMENT
                    expectedMonthlyVolume: FROM_0_TO_50000
                    incorporateDate: '2018-05-12'
                    isStartup: false
                    address:
                      addressLine1: Rua das Flores, 100
                      addressLine2: Suite 456
                      city: São Paulo
                      state: SP
                      country: BR
                      postalCode: 01234-567
              individual:
                summary: Individually-owned account
                value:
                  assets:
                    - code: BRL
                      accountType: NAMED
                  owner:
                    type: INDIVIDUAL
                    firstName: Maria
                    lastName: Silva
                    taxId:
                      value: '12345678909'
                      type: CPF
                    expectedMonthlyVolume: FROM_0_TO_50000
                    birthDate: '1990-03-21'
                    address:
                      addressLine1: Rua das Flores, 100
                      city: São Paulo
                      state: SP
                      country: BR
                      postalCode: 01234-567
      responses:
        '201':
          description: Account created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '400':
          description: Invalid request.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidTaxId:
                  summary: Owner taxId fails the type-specific validator
                  value:
                    code: INVALID_DATA
                    message: Object contains invalid data
                    details:
                      errors:
                        - code: VALIDATE_TAX_ID
                          message: Tax ID is invalid for the given type
                          field: body:owner.taxId.value
                          params: {}
                unsupportedAsset:
                  summary: Requested asset code is not supported
                  value:
                    code: UNSUPPORTED_ASSET
                    message: 'Asset not supported by any provider: asset=ETH'
                    details:
                      asset: ETH
                accountTypeRequired:
                  summary: Fiat asset is missing the required accountType
                  value:
                    code: INVALID_DATA
                    message: Object contains invalid data
                    details:
                      errors:
                        - code: ACCOUNT_TYPE_REQUIRED_FOR_NON_CRYPTO
                          message: accountType is required for non-crypto assets
                          field: body:assets[0].code
                          params: {}
                invalidData:
                  summary: Request body failed validation
                  value:
                    code: INVALID_DATA
                    message: Object contains invalid data
                    details:
                      errors:
                        - code: REQUIRED
                          message: Parameter 'body:assets' not found in request
                          field: body:assets
                          params: {}
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Customer not found.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                customerNotFound:
                  summary: Customer not found for the authenticated token
                  value:
                    code: RESOURCE_NOT_FOUND
                    message: >-
                      Customer with given parameters
                      [id:c1a2b3c4-d5e6-7890-abcd-ef1234567890] not found
                    details:
                      resource: Customer
                      parameters:
                        id: c1a2b3c4-d5e6-7890-abcd-ef1234567890
        '422':
          description: Business rule violation.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ubosNotAllowedForIndividual:
                  summary: Individual-owned account cannot have UBOs
                  value:
                    code: UBOS_NOT_ALLOWED_FOR_INDIVIDUAL
                    message: UBOs are not allowed for individual accounts
                    details:
                      taxId: '12345678900'
components:
  parameters:
    TraceVersion:
      name: X-Trace-Version
      in: header
      required: false
      description: API version. Omit to use the default version.
      schema:
        type: string
        example: '1'
    IdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: true
      description: >-
        Unique key to ensure idempotent request processing. Required on all
        `POST`, `PUT`, and `PATCH` requests.
      schema:
        type: string
        format: uuid
  schemas:
    CreateAccountRequest:
      type: object
      description: Request body for creating a new account.
      properties:
        assets:
          type: array
          description: >-
            Desired asset currencies. At least one required; each code must be
            unique.
          minItems: 1
          items:
            $ref: '#/components/schemas/AssetRequest'
        owner:
          $ref: '#/components/schemas/OwnerRequest'
      required:
        - assets
        - owner
    AccountResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: a1b2c3d4-5e6f-7890-abcd-ef1234567890
          readOnly: true
        sourceAccountId:
          type:
            - string
            - 'null'
          format: uuid
          description: Parent account ID. Null for named accounts.
          example: null
        customer:
          $ref: '#/components/schemas/CustomerResponse'
        owner:
          $ref: '#/components/schemas/OwnerResponse'
        assets:
          type: array
          description: >-
            Assets enabled on the account, with the onboarding status of the
            underlying provider account.
          items:
            $ref: '#/components/schemas/AssetResponse'
        requirements:
          $ref: '#/components/schemas/RequirementsResponse'
        tags:
          type: array
          description: >
            System-managed labels attached to the account. Some tags propagate
            to operations executed against this account.
          items:
            $ref: '#/components/schemas/TagResponse'
          example:
            - key: psp
              value: Amazon
            - key: null
              value: hidden
            - key: compliance-tier
              value: high
        currentState:
          $ref: '#/components/schemas/AccountState'
        states:
          type: array
          description: Full state history of the account.
          items:
            $ref: '#/components/schemas/AccountState'
        createdAt:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
          readOnly: true
      required:
        - id
        - customer
        - owner
        - assets
        - requirements
        - tags
        - currentState
        - states
        - createdAt
        - updatedAt
    ErrorResponse:
      type: object
      description: >-
        Standard error envelope. The HTTP response also carries an
        `X-Request-Id` header — reference it when contacting Trace Finance
        support. See [Errors](/guides/principles/errors).
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable description.
        details:
          type: object
          additionalProperties: true
      required:
        - code
        - message
    AssetRequest:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/Asset'
        accountType:
          oneOf:
            - $ref: '#/components/schemas/AccountType'
            - type: 'null'
          description: >
            Which account to open for this asset when the customer holds more
            than one capability for the same currency (e.g., BRL as both `NAMED`
            and `VIRTUAL`). Required for fiat assets; omit for crypto assets
            (stablecoins), where it is inferred. Omitting it for a fiat asset
            returns `ACCOUNT_TYPE_REQUIRED_FOR_NON_CRYPTO`.
      required:
        - code
    OwnerRequest:
      description: The legal entity that owns the account. Discriminated by `type`.
      oneOf:
        - $ref: '#/components/schemas/CompanyOwnerRequest'
        - $ref: '#/components/schemas/IndividualOwnerRequest'
      discriminator:
        propertyName: type
        mapping:
          COMPANY:
            $ref: '#/components/schemas/CompanyOwnerRequest'
          INDIVIDUAL:
            $ref: '#/components/schemas/IndividualOwnerRequest'
    CustomerResponse:
      type: object
      properties:
        id:
          type: string
          description: Customer identifier.
          example: c1a2b3c4-d5e6-7890-abcd-ef1234567890
          readOnly: true
      required:
        - id
    OwnerResponse:
      description: The legal entity that owns the account. Discriminated by `type`.
      oneOf:
        - $ref: '#/components/schemas/CompanyOwnerResponse'
        - $ref: '#/components/schemas/IndividualOwnerResponse'
      discriminator:
        propertyName: type
        mapping:
          COMPANY:
            $ref: '#/components/schemas/CompanyOwnerResponse'
          INDIVIDUAL:
            $ref: '#/components/schemas/IndividualOwnerResponse'
    AssetResponse:
      type: object
      description: >-
        An asset available on the account and the onboarding status of its
        underlying provider account.
      properties:
        currency:
          $ref: '#/components/schemas/Asset'
        allowsVirtualAccounts:
          type: boolean
          description: Whether virtual accounts can be issued for this asset.
          example: false
        status:
          type: string
          description: Onboarding status of the provider account that custodies this asset.
          enum:
            - ONBOARDING
            - ACTIVE
            - FAILED
            - FROZEN
            - DEACTIVATED
          example: ONBOARDING
          readOnly: true
      required:
        - currency
        - allowsVirtualAccounts
        - status
    RequirementsResponse:
      type: object
      description: Requirement buckets grouped by lifecycle stage.
      properties:
        currentlyDue:
          type: array
          description: Requirements pending submission.
          items:
            $ref: '#/components/schemas/RequirementResponse'
        pendingVerification:
          type: array
          description: Submitted requirements awaiting verification.
          items:
            $ref: '#/components/schemas/RequirementResponse'
        errors:
          type: array
          description: Rejected requirements with reasons.
          items:
            $ref: '#/components/schemas/RequirementResponse'
        satisfied:
          type: array
          description: Fulfilled requirements.
          items:
            $ref: '#/components/schemas/RequirementResponse'
      required:
        - currentlyDue
        - pendingVerification
        - errors
        - satisfied
    TagResponse:
      type: object
      description: >
        A label attached to a resource. Tags are system-managed — Trace Finance
        assigns them based on routing, compliance, and operational criteria.
        Clients cannot create, modify, or remove tags via the API.
      properties:
        key:
          type:
            - string
            - 'null'
          description: >
            Category for keyed tags (e.g., `psp`, `compliance-tier`). `null` for
            single-value labels.
          example: psp
        value:
          type: string
          description: >
            For keyed tags, the right-hand side of the label. For single-value
            labels, the entire tag.
          example: Amazon
      required:
        - value
    AccountState:
      type: object
      description: A point-in-time state of the account.
      properties:
        status:
          type: string
          enum:
            - ACTION_REQUIRED
            - REVIEWING
            - OPENING
            - ACTIVE
            - REJECTED
            - CLOSED
          example: ACTION_REQUIRED
        reason:
          $ref: '#/components/schemas/Reason'
        createdAt:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
      required:
        - status
        - createdAt
    Asset:
      type: string
      enum:
        - BRL
        - USDT
        - USDC
      description: >
        ISO 4217 currency code or stablecoin ticker. The maximum decimal scale
        of an `AmountValue` paired with this asset depends on the asset:


        | Asset | Decimals |

        |---|---|

        | BRL | 2 |

        | USDT | 6 |

        | USDC | 6 |
      example: BRL
    AccountType:
      type: string
      description: >
        The kind of account opened for a fiat asset. `NAMED` and
        `NAMED_NON_RESIDENT` are accounts held in the account owner's name;
        `VIRTUAL` accounts are issued by Trace Finance.
      enum:
        - NAMED
        - VIRTUAL
        - NAMED_NON_RESIDENT
      example: NAMED
    CompanyOwnerRequest:
      title: Company
      type: object
      properties:
        type:
          type: string
          enum:
            - COMPANY
        legalName:
          type: string
          description: Registered legal name of the company.
          example: Acme Ltda
        taxId:
          $ref: '#/components/schemas/TaxIdRequest'
        industry:
          $ref: '#/components/schemas/Industry'
        expectedMonthlyVolume:
          $ref: '#/components/schemas/ExpectedMonthlyVolume'
        incorporateDate:
          type:
            - string
            - 'null'
          format: date
          description: Company incorporation date in ISO format (yyyy-MM-dd). Optional.
          example: '2018-05-12'
        isStartup:
          type:
            - boolean
            - 'null'
          default: false
          description: Whether the company is a startup. Optional.
          example: false
        address:
          $ref: '#/components/schemas/AddressRequest'
      required:
        - type
        - legalName
        - taxId
        - industry
        - expectedMonthlyVolume
        - address
    IndividualOwnerRequest:
      title: Individual
      type: object
      properties:
        type:
          type: string
          enum:
            - INDIVIDUAL
        firstName:
          type: string
          description: First name of the individual.
          example: Maria
        lastName:
          type: string
          description: Last name of the individual.
          example: Silva
        taxId:
          $ref: '#/components/schemas/TaxIdRequest'
        expectedMonthlyVolume:
          $ref: '#/components/schemas/ExpectedMonthlyVolume'
        birthDate:
          type:
            - string
            - 'null'
          format: date
          description: Date of birth in ISO format (yyyy-MM-dd). Optional.
          example: '1990-03-21'
        address:
          $ref: '#/components/schemas/AddressRequest'
      required:
        - type
        - firstName
        - lastName
        - taxId
        - expectedMonthlyVolume
        - address
    CompanyOwnerResponse:
      title: Company
      type: object
      properties:
        type:
          type: string
          enum:
            - COMPANY
        legalName:
          type: string
          example: Acme Ltda
        taxId:
          $ref: '#/components/schemas/TaxIdResponse'
        industry:
          $ref: '#/components/schemas/Industry'
        expectedMonthlyVolume:
          $ref: '#/components/schemas/ExpectedMonthlyVolume'
        address:
          $ref: '#/components/schemas/AddressResponse'
        ubos:
          type: array
          items:
            $ref: '#/components/schemas/UBOResponse'
      required:
        - type
        - legalName
        - taxId
        - industry
        - expectedMonthlyVolume
        - address
        - ubos
    IndividualOwnerResponse:
      title: Individual
      type: object
      properties:
        type:
          type: string
          enum:
            - INDIVIDUAL
        firstName:
          type: string
          example: Maria
        lastName:
          type: string
          example: Silva
        taxId:
          $ref: '#/components/schemas/TaxIdResponse'
        expectedMonthlyVolume:
          $ref: '#/components/schemas/ExpectedMonthlyVolume'
        address:
          $ref: '#/components/schemas/AddressResponse'
      required:
        - type
        - firstName
        - lastName
        - taxId
        - expectedMonthlyVolume
        - address
    RequirementResponse:
      description: >
        A single requirement. The `type` field discriminates between six shapes:


        - `ACCOUNT_DOCUMENT`: a specific document is required at the account
        level.

        - `UBO_DOCUMENT`: a specific document is required for a beneficial
        owner.

        - `IDENTITY_VERIFICATION`: any one document from `options` satisfies an
        identity verification requirement.

        - `INCORPORATION_DOCUMENT`: any one document from `options` satisfies an
        incorporation requirement.

        - `ACCOUNT_FIELD`: an account-level field was rejected during review.

        - `UBO_FIELD`: a UBO field was rejected during review.
      oneOf:
        - $ref: '#/components/schemas/AccountDocumentRequirement'
        - $ref: '#/components/schemas/UboDocumentRequirement'
        - $ref: '#/components/schemas/IdentityVerificationRequirement'
        - $ref: '#/components/schemas/IncorporationDocumentRequirement'
        - $ref: '#/components/schemas/AccountFieldRejection'
        - $ref: '#/components/schemas/UboFieldRejection'
      discriminator:
        propertyName: type
        mapping:
          ACCOUNT_DOCUMENT:
            $ref: '#/components/schemas/AccountDocumentRequirement'
          UBO_DOCUMENT:
            $ref: '#/components/schemas/UboDocumentRequirement'
          IDENTITY_VERIFICATION:
            $ref: '#/components/schemas/IdentityVerificationRequirement'
          INCORPORATION_DOCUMENT:
            $ref: '#/components/schemas/IncorporationDocumentRequirement'
          ACCOUNT_FIELD:
            $ref: '#/components/schemas/AccountFieldRejection'
          UBO_FIELD:
            $ref: '#/components/schemas/UboFieldRejection'
    Reason:
      type:
        - object
        - 'null'
      description: Explains why a state transition occurred.
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: DOCUMENT_REJECTED
        message:
          type: string
          description: Human-readable description.
          example: Document is illegible
        details:
          type: object
          additionalProperties: true
          description: Additional context. May be empty.
          example: {}
      required:
        - code
        - message
        - details
    TaxIdRequest:
      type: object
      description: >-
        Tax identifier for the owner or beneficial owner. Validated against the
        type-specific format rules.
      properties:
        value:
          type: string
          description: Tax identifier digits or alphanumeric value (depending on type).
          example: '11222333000181'
        type:
          $ref: '#/components/schemas/TaxIdType'
      required:
        - value
        - type
    Industry:
      type: string
      description: Industry classification of the company.
      enum:
        - AGRICULTURE
        - AGRICULTURAL_FOOD_SUPPLY
        - ENERGY
        - ENERGY_OIL_GAS
        - RETAIL_GENERAL
        - ECOMMERCE_ONLINE_RETAIL
        - DISTRIBUTION_WHOLESALE
        - MOTOR_VEHICLE_RETAIL_PARTS
        - FIRST_HAND_CAR_RETAIL
        - SECOND_HAND_CAR_RETAIL
        - SPORTS_EQUIPMENT_RETAIL
        - TEXTILE_WHOLESALE
        - PRECIOUS_METALS_WHOLESALE
        - AIRCRAFT_AERONAUTIC_WHOLESALE
        - PRE_PRIMARY_PRIMARY_EDUCATION
        - SECONDARY_POST_SECONDARY_EDUCATION
        - HIGHER_EDUCATION
        - PRIVATE_EDUCATION_TRAINING_SERVICES
        - ARTS_MEDIA
        - VIDEO_TV_PRODUCTION
        - TELECOM_MEDIA
        - SPORTS_CLUBS_ASSOCIATIONS
        - SPORTS_COACHING
        - GAMING_EGAMING
        - PRODUCTION_CULTURAL_HANDMADE_GOODS
        - FASHION_PRODUCTION
        - PASSENGER_TRANSPORT
        - LEASING_TRANSPORT_EQUIPMENT
        - BANKING
        - INSURANCE
        - LENDING_CREDIT_SERVICES
        - INVESTMENT_ASSET_MANAGEMENT
        - FINANCIAL_SERVICES_NON_CRYPTO
        - PAYMENT_SERVICE_PROVIDERS
        - CRYPTO_EXCHANGE_CEX
        - WALLET_PROVIDER
        - CRYPTO_LIQUIDITY_MARKET_MAKERS
        - CRYPTO_MINING
        - WEB3_FINANCIAL_SERVICES
        - GAMBLING_CASINOS
        - ADULT_ENTERTAINMENT
        - MEDICAL_CARE_CLINICS
        - HEALTHCARE_SERVICES
        - MANUFACTURE_MEDICAL_SUPPLIES
        - PHARMACEUTICAL_MANUFACTURING
        - MEDICAL_PHARMACEUTICAL_SERVICES
        - DENTAL_CARE
        - VETERINARY_CARE
        - AERONAUTICS_AEROSPACE_MANUFACTURING
        - AUTOMOTIVE_MANUFACTURING
        - CONSTRUCTION_INFRASTRUCTURE
        - METAL_MANUFACTURING
        - WATER_GAS_PIPELINE_CONSTRUCTION
        - INDUSTRIAL_COMPANIES_GENERAL
        - PUBLIC_ADMINISTRATION
        - LOCAL_GOVERNMENT
        - PUBLIC_SERVICES_AUTHORITIES
        - NONPROFIT_CHARITY_ORGANIZATIONS
        - REAL_ESTATE_AGENCIES
        - REAL_ESTATE_DEVELOPERS
        - ONLINE_REAL_ESTATE_MARKETPLACES
        - INFORMATION_TECHNOLOGY_GENERAL
        - COMPUTER_HIGH_TECH_TELECOM
        - SOFTWARE_DEVELOPMENT
        - IT_INFRASTRUCTURE_FACILITIES_MANAGEMENT
        - COMPUTER_ELECTRONICS_REPAIR
        - CYBERSECURITY_INFORMATION_SECURITY
        - AUDIT_ACCOUNTING_TECHNOLOGY
        - TECHNOLOGY_CONSULTING
        - ENGINEERING_TECHNICAL_SERVICES
        - FREIGHT_LOGISTICS
        - TRANSPORTATION
        - HOTEL_HOSPITALITY
        - RESTAURANTS_CAFES
        - TOURISM
        - TRAVEL_AGENCIES
        - LEGAL_SERVICES
        - HUMAN_RESOURCES
        - CLEANING_MAINTENANCE_SERVICES
        - CULTURAL_GOODS_HANDICRAFTS_TRADE
        - FASHION_DESIGN
        - PRECIOUS_METALS_STONES
        - ENVIRONMENT_SUSTAINABILITY_SERVICES
        - ARMAMENT_DEFENSE_INDUSTRY
        - UNEMPLOYED_STUDENT_RETIRED
        - OTHERS
      example: SOFTWARE_DEVELOPMENT
    ExpectedMonthlyVolume:
      type: string
      description: >-
        Expected monthly transaction volume for the account owner, declared at
        onboarding for compliance review. Bucket bounds are expressed in the
        local currency of the owner; the bucket name reflects the inclusive
        lower bound and the inclusive upper bound (or `ABOVE_*` for the
        open-ended top bucket).
      enum:
        - FROM_0_TO_50000
        - FROM_50001_TO_500000
        - FROM_500001_TO_5000000
        - FROM_5000001_TO_50000000
        - ABOVE_50000000
      example: FROM_0_TO_50000
    AddressRequest:
      type: object
      properties:
        addressLine1:
          type: string
          example: Rua das Flores, 100
        addressLine2:
          type:
            - string
            - 'null'
          example: Suite 456
        city:
          type: string
          example: São Paulo
        state:
          type: string
          example: SP
        country:
          $ref: '#/components/schemas/Country'
        postalCode:
          type: string
          example: 01234-567
      required:
        - addressLine1
        - city
        - state
        - country
        - postalCode
    TaxIdResponse:
      type: object
      description: Tax identifier returned for an owner or beneficial owner.
      properties:
        value:
          type: string
          example: '11222333000181'
        type:
          $ref: '#/components/schemas/TaxIdType'
      required:
        - value
        - type
    AddressResponse:
      type: object
      properties:
        addressLine1:
          type: string
          example: Rua das Flores, 100
        addressLine2:
          type:
            - string
            - 'null'
          example: Suite 456
        city:
          type: string
          example: São Paulo
        state:
          type:
            - string
            - 'null'
          example: SP
        country:
          $ref: '#/components/schemas/Country'
        postalCode:
          type: string
          example: 01234-567
      required:
        - addressLine1
        - city
        - country
        - postalCode
    UBOResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: b2c3d4e5-f6a7-8901-bcde-f12345678901
          readOnly: true
        name:
          type: string
          example: João Silva
        taxId:
          $ref: '#/components/schemas/TaxIdResponse'
        address:
          $ref: '#/components/schemas/AddressResponse'
        phone:
          type: string
          example: '5511999999999'
        email:
          type: string
          format: email
          example: joao.silva@example.com
        ownershipPercentage:
          type:
            - number
            - 'null'
          format: double
          example: 50
        isLegalRepresentative:
          type: boolean
          example: false
        currentState:
          $ref: '#/components/schemas/UBOState'
      required:
        - id
        - name
        - taxId
        - address
        - phone
        - email
        - isLegalRepresentative
        - currentState
    AccountDocumentRequirement:
      title: Account document
      type: object
      description: A document required at the account level.
      properties:
        type:
          type: string
          enum:
            - ACCOUNT_DOCUMENT
        documentType:
          $ref: '#/components/schemas/DocumentType'
        documentSubType:
          oneOf:
            - $ref: '#/components/schemas/DocumentSubType'
            - type: 'null'
          description: >
            Sub-classification of the document. Set when the `documentType`
            requires a specific side (e.g., `FRONT_SIDE` for `ID_CARD`).
        requiredMetadata:
          type:
            - array
            - 'null'
          description: >-
            Metadata keys that must accompany the document upload (e.g.,
            `country`, `number`).
          items:
            type: string
          example:
            - country
        metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Metadata captured for an already-fulfilled requirement.
        reason:
          $ref: '#/components/schemas/Reason'
      required:
        - type
        - documentType
    UboDocumentRequirement:
      title: UBO document
      type: object
      description: A document required for a specific beneficial owner.
      properties:
        type:
          type: string
          enum:
            - UBO_DOCUMENT
        documentType:
          $ref: '#/components/schemas/DocumentType'
        documentSubType:
          oneOf:
            - $ref: '#/components/schemas/DocumentSubType'
            - type: 'null'
          description: Sub-classification of the document.
        uboId:
          type: string
          format: uuid
          description: Identifier of the beneficial owner this document belongs to.
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
        requiredMetadata:
          type:
            - array
            - 'null'
          description: Metadata keys that must accompany the document upload.
          items:
            type: string
          example:
            - country
        metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Metadata captured for an already-fulfilled requirement.
        reason:
          $ref: '#/components/schemas/Reason'
      required:
        - type
        - documentType
        - uboId
    IdentityVerificationRequirement:
      title: Identity verification
      type: object
      description: >
        A grouped requirement satisfied by any one of the document options
        listed in `options` (e.g., identity verification can be fulfilled with
        an `ID_CARD`, `PASSPORT`, or `DRIVER_LICENSE`). Each option carries the
        `subTypes` and `requiredMetadata` the client must supply when uploading
        that specific document type. When the requirement belongs to a
        beneficial owner, `uboId` identifies which one.
      properties:
        type:
          type: string
          enum:
            - IDENTITY_VERIFICATION
        options:
          type: array
          description: Acceptable document options that satisfy this requirement.
          items:
            $ref: '#/components/schemas/DocumentOption'
        uboId:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Identifier of the beneficial owner this requirement belongs to.
            Omitted for account-level requirements.
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
      required:
        - type
        - options
    IncorporationDocumentRequirement:
      title: Incorporation document
      type: object
      description: >
        A grouped requirement satisfied by any one of the document options
        listed in `options` (e.g., an incorporation requirement can be fulfilled
        with an `ARTICLES_OF_ASSOCIATION` or an `INCORPORATION_ARTICLES`). Each
        option carries the `subTypes` and `requiredMetadata` the client must
        supply when uploading that specific document type.
      properties:
        type:
          type: string
          enum:
            - INCORPORATION_DOCUMENT
        options:
          type: array
          description: Acceptable document options that satisfy this requirement.
          items:
            $ref: '#/components/schemas/DocumentOption'
        uboId:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Identifier of the beneficial owner this requirement belongs to.
            Omitted for account-level requirements.
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
      required:
        - type
        - options
    AccountFieldRejection:
      title: Account field rejection
      type: object
      description: An account-level field was rejected during compliance review.
      properties:
        type:
          type: string
          enum:
            - ACCOUNT_FIELD
        fieldName:
          type: string
          description: Name of the rejected field.
          example: owner.legalName
        reason:
          $ref: '#/components/schemas/Reason'
      required:
        - type
        - fieldName
        - reason
    UboFieldRejection:
      title: UBO field rejection
      type: object
      description: A UBO field was rejected during compliance review.
      properties:
        type:
          type: string
          enum:
            - UBO_FIELD
        fieldName:
          type: string
          description: Name of the rejected field.
          example: name
        uboId:
          type: string
          description: Identifier of the beneficial owner whose field was rejected.
          example: a1b2c3d4-e5f6-7890-1234-567890abcdef
        reason:
          $ref: '#/components/schemas/Reason'
      required:
        - type
        - fieldName
        - uboId
        - reason
    TaxIdType:
      type: string
      description: >
        Country-specific tax identifier type. The type itself implies the
        country (`CPF`/`CNPJ` are Brazilian, `CUIT`/`CUIL` are Argentine,
        `RUT_CL` is Chilean, etc.).
      enum:
        - CPF
        - CNPJ
        - CUIT
        - CUIL
        - RUT_CL
        - RUT_UY
        - CI_UY
        - RUC
        - DNI_PE
        - NIT
        - CC
        - RFC
        - RUC_PY
        - CI_PY
        - NIPC
        - NIF_PT
        - CIF
        - NIF_ES
        - NIE
        - SIREN
        - SIRET
        - NIF_FR
        - PARTITA_IVA
        - CODICE_FISCALE
        - UST_IDNR
        - STEUER_ID
        - KVK
        - BSN
        - BCE
        - NN_BE
        - ORGANISATIONSNUMMER
        - PERSONNUMMER
        - ORGANISASJONSNUMMER
        - FODSELSNUMMER
        - UID_CH
        - AHV
        - VAT_GB
        - NIN
        - EIN
        - SSN
        - ITIN
        - BN_CA
        - SIN
        - ABN
        - TFN
        - USCC
        - CORPORATE_NUMBER_JP
        - MY_NUMBER
        - BRN_KR
        - RRN
        - GSTIN
        - PAN
        - INN_RU
        - COMPANY_NUMBER_IL
        - TEUDAT_ZEHUT
        - TRADE_LICENSE
        - EMIRATES_ID
        - CIPC
        - SA_ID
      example: CNPJ
    Country:
      type: string
      description: ISO 3166-1 alpha-2 country code.
      example: BR
      enum:
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CD
        - CG
        - CK
        - CR
        - HR
        - CU
        - CW
        - CY
        - CZ
        - CI
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - SZ
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - MK
        - RO
        - RU
        - RW
        - RE
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
    UBOState:
      type: object
      description: A point-in-time state of a beneficial owner.
      properties:
        status:
          type: string
          enum:
            - PENDING
            - APPROVED
            - REJECTED
          example: PENDING
        reason:
          $ref: '#/components/schemas/Reason'
        createdAt:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
      required:
        - status
        - createdAt
    DocumentType:
      type: string
      description: Type of document.
      enum:
        - PASSPORT
        - ARTICLES_OF_ASSOCIATION
        - OTHER
        - AGREEMENT
        - DIRECTORS_REGISTRY
        - INCORPORATION_ARTICLES
        - INCORPORATION_CERT
        - PROOF_OF_ADDRESS
        - SHAREHOLDER_REGISTRY
        - POWER_OF_ATTORNEY
        - STATE_REGISTRY
        - EVIDENCE_OF_SOURCE_OF_FUNDS
        - EVIDENCE_OF_SOURCE_OF_WEALTH
        - PROOF_OF_REGULATORY_LICENSE
        - PROOF_OF_BUSINESS_ACTIVITY
        - FUND_FLOW_EXPLANATION
        - AML_POLICY
        - FINANCIAL_STATEMENT
        - ORGANIZATIONAL_CHART
        - SHAREHOLDER_OWNERSHIP
        - WOLFSBERG_QUESTIONNAIRE
        - ID_CARD
        - DRIVER_LICENSE
        - RESIDENCE_PERMIT
        - SELFIE
        - UTILITY_BILL
        - KYC_FORM
        - BAAS_ADHESION_FORM
        - PJ_PARTNER_DOCUMENTS
        - PJ_PARTNER_FINANCIAL_STATEMENT
        - SIGNING_AUTHORITY_PROOF
        - KYC_MONITORING_EVIDENCE
      example: ARTICLES_OF_ASSOCIATION
    DocumentSubType:
      type: string
      description: Sub-classification for documents that have multiple sides.
      enum:
        - FRONT_SIDE
        - BACK_SIDE
      example: FRONT_SIDE
    DocumentOption:
      type: object
      description: >
        One acceptable document type within a grouped requirement, together with
        the sub-types and metadata keys the client must supply when uploading
        that type. `subTypes` and `requiredMetadata` are omitted when empty.
      properties:
        documentType:
          $ref: '#/components/schemas/DocumentType'
        subTypes:
          type: array
          description: >-
            Sub-classifications required for this document type (e.g.,
            `FRONT_SIDE` and `BACK_SIDE` for `ID_CARD`). Omitted when the
            document type has no sub-types.
          items:
            $ref: '#/components/schemas/DocumentSubType'
        requiredMetadata:
          type: array
          description: >-
            Metadata keys that must accompany the upload of this document type
            (e.g., `country`, `number`). Omitted when no metadata is required.
          items:
            type: string
          example:
            - country
      required:
        - documentType
  headers:
    RequestId:
      description: >-
        Unique request identifier emitted on every response. Reference it when
        contacting Trace Finance support so we can trace the request end-to-end.
        See [Errors](/guides/principles/errors).
      schema:
        type: string
        format: uuid
  responses:
    UnauthorizedError:
      description: Missing or invalid authentication token.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidToken:
              $ref: '#/components/examples/InvalidToken'
            expiredToken:
              $ref: '#/components/examples/ExpiredToken'
  examples:
    InvalidToken:
      summary: Bearer token is invalid or malformed
      value:
        code: INVALID_ACCESS_TOKEN
        message: Invalid access token
        details: {}
    ExpiredToken:
      summary: Bearer token has expired
      value:
        code: EXPIRED_ACCESS_TOKEN
        message: Expired access token
        details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer token. Include as `Authorization: Bearer <token>`. See the
        [Authentication](/guides/authentication) guide for how to obtain one.

````