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

# List accounts

> Returns the accounts in the caller’s tree, newest-first, with opaque cursor pagination. Filter by `parent` (an account id, or `me` for the caller’s direct children) and `status`.



## OpenAPI

````yaml /openapi.json get /v1/accounts
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Comprehensive payment platform API supporting fiat and crypto payments,
    currency conversion, and compliance management
  title: Zuba Payment Platform API
  version: '1.0'
servers: []
security: []
tags:
  - description: Manage M2M API keys and credentials
    name: API Keys
  - description: Internal ledger accounts and transactions
    name: Ledger
  - description: Handle incoming payments and deposits
    name: Pay-ins
  - description: Manage payouts, beneficiaries, and SEPA transfers
    name: Payouts
  - description: Manage outbound webhook endpoints and deliveries
    name: Webhooks
paths:
  /v1/accounts:
    get:
      tags:
        - Accounts
      summary: List accounts
      description: >-
        Returns the accounts in the caller’s tree, newest-first, with opaque
        cursor pagination. Filter by `parent` (an account id, or `me` for the
        caller’s direct children) and `status`.
      operationId: AccountsController_listAccounts
      parameters:
        - description: Opaque cursor returned by the previous page
          in: query
          name: cursor
          required: false
          schema:
            type: string
        - description: Number of items per page
          in: query
          name: limit
          required: false
          schema:
            default: 50
            maximum: 200
            minimum: 1
            type: number
        - description: >-
            Filter to children of an account id, or 'me' for the caller's direct
            children.
          in: query
          name: parent
          required: false
          schema:
            example: me
            type: string
        - in: query
          name: status
          required: false
          schema:
            enum:
              - pending
              - active
              - suspended
              - closed
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountListDto'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponseDto'
          description: Invalid query params (bad cursor, limit, parent, or status)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponseDto'
          description: insufficient_scope (missing read:accounts)
      security:
        - bearer: []
components:
  schemas:
    AccountListDto:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AccountResponseDto'
          type: array
        hasMore:
          description: Whether more items exist after this page
          example: true
          type: boolean
        nextCursor:
          description: >-
            Opaque cursor for the next page, or null when there are no more
            items
          example: >-
            eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTAxLTAxVDAwOjAwOjAwLjAwMFoiLCJpZCI6IjEyM2U0NTY3LWU4OWItNDJkMy1hNDU2LTQyNjYxNDE3NDAwMCJ9
          nullable: true
          type: string
        object:
          description: Stable resource-specific collection discriminator
          enum:
            - account.list
          example: account.list
          pattern: ^[a-z][a-z0-9_]*\.list$
          type: string
      required:
        - object
        - hasMore
        - nextCursor
        - data
      type: object
    GenericErrorResponseDto:
      properties:
        error:
          description: Error type identifier
          example: BAD_REQUEST
          type: string
        message:
          description: Error message
          example: Bad Request
          type: string
        path:
          description: Request path that generated the error
          example: /v1/beneficiaries
          type: string
        statusCode:
          description: HTTP status code
          example: 400
          type: number
        timestamp:
          description: ISO timestamp when the error occurred
          example: '2024-01-15T10:30:00.000Z'
          type: string
      required:
        - statusCode
        - message
        - error
        - timestamp
        - path
      type: object
    AccountResponseDto:
      properties:
        accountType:
          enum:
            - master
            - sub
          type: string
        country:
          description: ISO-3166 alpha-2
          example: SN
          type: string
        createdAt:
          format: date-time
          type: string
        id:
          description: Account record id
          format: uuid
          type: string
        parentAccountId:
          description: The master that owns this account. Derived from the API key.
          format: uuid
          type: string
        status:
          enum:
            - pending
            - active
            - suspended
            - closed
          type: string
      required:
        - id
        - parentAccountId
        - accountType
        - status
        - country
        - createdAt
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: Enter Auth0 JWT token
      scheme: bearer
      type: http

````