> ## 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

<Warning>
  **v1 (legacy).** This page documents the API before the v2 update. The v1
  format is not enabled for new accounts and must be enabled on your account by
  your account manager. New integrations should use the
  [current documentation](/introduction). To update an existing integration,
  follow the [migration guide](/migration).
</Warning>

### 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 v1/api-reference/bank-accounts-docs.json post /api/bank/accounts
openapi: 3.0.0
info:
  version: v1.0.0
  title: Bank accounts API (legacy v1)
  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
        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'
        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 for MXN accounts held at NVIO, which cannot be
            credited without it. Sending it for any other account is rejected.
      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
        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 for MXN accounts held at NVIO.
        id:
          type: string
          description: Id of the bank account.
          example: 6659d6bfd78151f639e74d53
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.