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

# Create a bank account

### Requirements to consume the endpoint.

<CardGroup cols={2}>
  <Card title="Create and modify role" icon="user-lock">
    The user must have the role to create and modify.
  </Card>

  <Card title="User approved" icon="check">
    The user must be approved in at least one country.
  </Card>
</CardGroup>

<Note>
  **Disclaimer**: The bank account being created must belong to the user. By creating a bank account through this endpoint, you confirm that the user is the owner of the bank account. Bank accounts that do not belong to the user may be marked as not approved during verification.
</Note>


## OpenAPI

````yaml post /api/bank/accounts
openapi: 3.0.0
info:
  version: v1.0.0
  title: Bank accounts API
  description: API for managing bank accounts in the Rio platform
servers:
  - url: https://app.sandbox.rio.trade
security:
  - apiKeyAuth: []
paths:
  /api/bank/accounts:
    post:
      summary: Create a bank account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createBankAccountSchema'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseCreatedABankAccountSchema'
          description: Created
components:
  schemas:
    createBankAccountSchema:
      type: object
      properties:
        userId:
          type: string
          description: Id of the user to whom the bank account is to be assigned.
          example: 66290ac8bd3903485989f82e
        country:
          description: Country in which the bank account is to be created.
          type: string
          enum:
            - MX
            - PE
            - CO
            - US
        fiat:
          description: Fiat currency of the bank account.
          type: string
          enum:
            - USD
            - MXN
            - PEN
            - COP
        bankName:
          type: string
          description: Name of the bank.
          example: Bank Name
        accountHolderName:
          type: string
          description: Name of the account holder.
          example: Account Holder Name
        accountNumber:
          type: string
          description: Number of the bank account.
          example: '0123456789'
        routingNumber:
          type: string
          description: Only for US bank accounts. The routing number of the account.
          example: '123456789'
        notes:
          type: string
          description: Notes related to the bank account.
          example: Notes
        CCI:
          type: string
          description: >-
            The CCI (Interbank Account Code) is a unique 20-digit number used to
            identify a specific bank account in the Peruvian financial system.
          example: '00111233001112345678'
        CLABE:
          type: string
          description: >-
            Which is a 18-digit code used to identify specific bank accounts in
            the Mexican banking system.
          example: '012345678901234567'
        email:
          type: string
          description: >-
            Only necessary if the bank account is NVIO bank account for Bitso
            transfer.
        address:
          type: object
          description: Only required for US bank accounts. Address of the bank account.
          properties:
            street1:
              type: string
              description: Street of the bank account.
              example: Street Name
            street2:
              type: string
              description: Street 2 of the bank account.
              example: Street Name
            city:
              type: string
              description: City of the bank account.
              example: City Name
            state:
              type: string
              description: State of the bank account.
              example: State Name
            postalCode:
              type: string
              description: Zip code of the bank account.
              example: '12345'
            country:
              type: string
              description: Country of the address of the bank account.
              enum:
                - MX
                - PE
                - CO
                - US
          required:
            - street1
            - city
            - state
            - postalCode
            - country
      required:
        - country
        - fiat
        - bankName
        - accountHolderName
    responseCreatedABankAccountSchema:
      type: object
      properties:
        userId:
          type: string
          description: Id of the user who created the bank account.
          example: 66562bc04fe8bf83c577c178
        createdAt:
          type: string
          description: Creation date and time of the bank account.
          example: '2024-05-31T13:55:11.452Z'
        bankName:
          type: string
          description: Name of the bank.
          example: BANAMEX
        country:
          description: Country of the bank.
          type: string
          enum:
            - MX
            - PE
            - CO
            - US
        accountHolderName:
          type: string
          description: Name of the account holder.
          example: Account holder name
        fiat:
          description: Fiat currency of the bank account.
          type: string
          enum:
            - USD
            - MXN
            - PEN
            - COP
        accountNumber:
          type: string
          description: Number of the bank account.
          example: '0123456789'
        CLABE:
          type: string
          description: >-
            The Standardized Bank Code (CLABE) associated with the bank account,
            used in Mexico.
          example: '0023764000000012345'
        CCI:
          type: string
          description: Only for bank accounts in Peru.
          example: '00111233001112345678'
        approved:
          type: boolean
          description: Indicates if the bank account has been approved.
          example: true
        notes:
          type: string
          description: Notes about the bank account.
          example: Bank Account
        email:
          type: string
          description: Only if the bank account is NVIO bank account.
        id:
          type: string
          description: Id of the bank account.
          example: 6659d6bfd78151f639e74d53
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````