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

# List all accounts for a given user



## OpenAPI

````yaml /openapi-v2.json get /api/v2/account/{username}
openapi: 3.1.0
info:
  title: LedgerSync V2 API
  version: '2.0'
servers:
  - url: https://ledgersyncappv2.com
    description: Production
  - url: https://staging.ledgersyncappv2.com
    description: Sandbox
security: []
tags:
  - name: account-api
    description: Account REST APIs
  - name: password-api
    description: Password REST APIs
  - name: transaction-api
    description: Transaction REST APIs
  - name: phone-verification-api
    description: Phone Verification REST APIs
  - name: employee-api
    description: Employee REST APIs
  - name: client-api
    description: Client REST APIs
  - name: check-api
    description: Check REST APIs
  - name: accounting-ai-api
    description: AI rule suggestion endpoints for external accounting integrations
  - name: institution-api
    description: Institution REST APIs
  - name: statement-api
    description: Statement REST APIs
  - name: authentication-api
    description: Auth REST APIs
paths:
  /api/v2/account/{username}:
    get:
      tags:
        - account-api
      summary: List all accounts for a given user
      operationId: listAccounts
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: Auth-Token
          in: header
          description: Authentication token provided during the authentication process
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A list of accounts for the given user
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ListAccountResponse'
        '401':
          description: Unauthorized. Bad credentials or the authentication system is down
          content:
            '*/*':
              schema:
                type: string
components:
  schemas:
    ListAccountResponse:
      type: object
      properties:
        banks:
          type: array
          items:
            $ref: '#/components/schemas/BankAccountDto'
        finCustomerId:
          type: string
        status:
          type: string
          enum:
            - 100 CONTINUE
            - 101 SWITCHING_PROTOCOLS
            - 102 PROCESSING
            - 103 EARLY_HINTS
            - 103 CHECKPOINT
            - 200 OK
            - 201 CREATED
            - 202 ACCEPTED
            - 203 NON_AUTHORITATIVE_INFORMATION
            - 204 NO_CONTENT
            - 205 RESET_CONTENT
            - 206 PARTIAL_CONTENT
            - 207 MULTI_STATUS
            - 208 ALREADY_REPORTED
            - 226 IM_USED
            - 300 MULTIPLE_CHOICES
            - 301 MOVED_PERMANENTLY
            - 302 FOUND
            - 302 MOVED_TEMPORARILY
            - 303 SEE_OTHER
            - 304 NOT_MODIFIED
            - 305 USE_PROXY
            - 307 TEMPORARY_REDIRECT
            - 308 PERMANENT_REDIRECT
            - 400 BAD_REQUEST
            - 401 UNAUTHORIZED
            - 402 PAYMENT_REQUIRED
            - 403 FORBIDDEN
            - 404 NOT_FOUND
            - 405 METHOD_NOT_ALLOWED
            - 406 NOT_ACCEPTABLE
            - 407 PROXY_AUTHENTICATION_REQUIRED
            - 408 REQUEST_TIMEOUT
            - 409 CONFLICT
            - 410 GONE
            - 411 LENGTH_REQUIRED
            - 412 PRECONDITION_FAILED
            - 413 PAYLOAD_TOO_LARGE
            - 413 REQUEST_ENTITY_TOO_LARGE
            - 414 URI_TOO_LONG
            - 414 REQUEST_URI_TOO_LONG
            - 415 UNSUPPORTED_MEDIA_TYPE
            - 416 REQUESTED_RANGE_NOT_SATISFIABLE
            - 417 EXPECTATION_FAILED
            - 418 I_AM_A_TEAPOT
            - 419 INSUFFICIENT_SPACE_ON_RESOURCE
            - 420 METHOD_FAILURE
            - 421 DESTINATION_LOCKED
            - 422 UNPROCESSABLE_ENTITY
            - 423 LOCKED
            - 424 FAILED_DEPENDENCY
            - 425 TOO_EARLY
            - 426 UPGRADE_REQUIRED
            - 428 PRECONDITION_REQUIRED
            - 429 TOO_MANY_REQUESTS
            - 431 REQUEST_HEADER_FIELDS_TOO_LARGE
            - 451 UNAVAILABLE_FOR_LEGAL_REASONS
            - 500 INTERNAL_SERVER_ERROR
            - 501 NOT_IMPLEMENTED
            - 502 BAD_GATEWAY
            - 503 SERVICE_UNAVAILABLE
            - 504 GATEWAY_TIMEOUT
            - 505 HTTP_VERSION_NOT_SUPPORTED
            - 506 VARIANT_ALSO_NEGOTIATES
            - 507 INSUFFICIENT_STORAGE
            - 508 LOOP_DETECTED
            - 509 BANDWIDTH_LIMIT_EXCEEDED
            - 510 NOT_EXTENDED
            - 511 NETWORK_AUTHENTICATION_REQUIRED
        message:
          type: string
    BankAccountDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Connection id. Numbered separately per source.
        name:
          type: string
        lastTransactionUpdateDate:
          type: string
        lastStatementUpdateDate:
          type: string
        lastFdeUpdateDate:
          type: string
        transactionUpdateStatus:
          type: string
          description: >-
            Result of the latest transaction refresh, for example UPDATED or
            FAILED. FAILED together with transactionErrorMessage means the
            connection needs attention; its stored transactions are still
            returned by the transaction list.
        statementUpdateStatus:
          type: string
        fdeUpdateStatus:
          type: string
        bankImageUrl:
          type: string
        institutionId:
          type: string
        source:
          type: string
          description: >-
            The data provider of this connection: FINICITY, MX, FDE or PDF. Send
            it as source to the transaction list for this connection's accounts.
            PDF connections are not served by the transaction list.
          example: FINICITY
        statementErrorMessage:
          type: string
        transactionErrorMessage:
          type: string
        fdeErrorMessage:
          type: string
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountDto'
        balanceUpdateStatus:
          type: string
        balanceUpdateErrorMsg:
          type: string
        aggregationStatusCode:
          type: integer
          format: int32
        initialRefreshStatus:
          type: string
        allowStatements:
          type: boolean
    AccountDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: LedgerSync account id. Send it as accountId to the transaction list.
        accountId:
          type: string
          description: >-
            The provider's own id for this account. Use id to identify the
            account in LedgerSync.
        name:
          type: string
        lastTransactionRefreshDate:
          type: string
        lastStatementRefreshDate:
          type: string
        lastTransactionDate:
          type: string
        oldestTransactionDate:
          type: string
        accountNumber:
          type: string
        currency:
          type: string
        type:
          type: string
        accountNumberDisplay:
          type: string

````

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