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

# Lookup an account

> Lookup an account by account number and bank code



## OpenAPI

````yaml POST /v1/banks/lookup
openapi: 3.1.0
info:
  title: Hashrails API
  description: >-
    Comprehensive API documentation for Hashrails – easily create, manage, and
    query virtual accounts, recipients, and bank integrations. Secure, scalable,
    and developer-friendly.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.railsfromthecrypt.com
  - url: https://api.hashrails.com
security: []
paths:
  /v1/banks/lookup:
    post:
      tags:
        - Public Banks
      summary: Lookup an account by account number and bank code
      description: Lookup an account by account number and bank code
      operationId: PublicBankController_
      parameters:
        - name: x-api-key
          in: header
          description: API key for authentication
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicLookupAccountRequestDto'
      responses:
        '201':
          description: Account lookup successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Account lookup successful
                  data:
                    oneOf:
                      - $ref: '#/components/schemas/PublicLookupAccountResponseDto'
components:
  schemas:
    PublicLookupAccountRequestDto:
      type: object
      properties:
        account_number:
          type: string
          example: '1234567890'
        bank_code:
          type: string
          example: '044'
      required:
        - account_number
        - bank_code
    PublicLookupAccountResponseDto:
      type: object
      properties:
        account_number:
          type: string
          example: '1234567890'
        account_name:
          type: string
          example: John Doe
        bank_name:
          type: string
          example: Wema Bank
      required:
        - account_number
        - account_name
        - bank_name

````