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

# Get Accounts

> Fetches existing accounts according to query parameters.



## OpenAPI

````yaml openapi.json get /accounts
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /accounts:
    get:
      summary: Get Accounts
      description: Fetches existing accounts according to query parameters.
      operationId: get-accounts
      parameters:
        - name: page
          in: query
          description: Specifies the position the response data should begin from.
          schema:
            type: integer
            format: int32
            default: 0
        - name: limit
          in: query
          description: The number of accounts to fetch.
          schema:
            type: integer
            format: int32
            default: 100
        - name: currency
          in: query
          description: The currency type of the accounts you wish to fetch.
          schema:
            type: string
            enum:
              - ALL
              - NGN
              - USD
            default: ALL
        - name: type
          in: query
          description: Specifies whether to fetch the settlement accounts or the wallets
          schema:
            type: string
            enum:
              - account
              - wallet
            default: account
      responses:
        '200':
          description: Accounts fetched successfully.
          headers:
            X-Powered-By:
              schema:
                type: string
              example: Express
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            X-RateLimit-Limit:
              schema:
                type: integer
              example: '250000'
            X-RateLimit-Remaining:
              schema:
                type: integer
              example: '249999'
            X-RateLimit-Reset:
              schema:
                type: integer
              example: '0'
            Content-Type:
              schema:
                type: string
              example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
              example: W/"2dd-sfRBgLV2BqnKnzwqFCi2UGdBgUQ"
            Connection:
              schema:
                type: string
              example: keep-alive
            Keep-Alive:
              schema:
                type: string
              example: timeout=5
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    type: array
                    description: Array of objects for the requested page.
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Unique identifier of the object.
                        business:
                          type: string
                          description: Identifier of the business that owns this object.
                        customer:
                          type: string
                          description: >-
                            Associated customer — an id, or a summary object on
                            nested resources.
                        type:
                          type: string
                          description: Type of the object.
                        currency:
                          type: string
                          description: ISO 4217 currency code (e.g. `NGN`).
                        accountName:
                          type: string
                          description: Name on the account.
                        bankCode:
                          type: string
                          description: Bank / institution code.
                        accountType:
                          type: string
                          description: Account product type (`Savings` or `Current`).
                        accountNumber:
                          type: string
                          description: Account number (NUBAN).
                        currentBalance:
                          type: integer
                          description: Current ledger balance, in the minor currency unit.
                        availableBalance:
                          type: integer
                          description: >-
                            Balance available for spending, in the minor
                            currency unit.
                        provider:
                          type: string
                          description: Underlying provider backing the object.
                        providerReference:
                          type: string
                        referenceCode:
                          type: string
                        reloadable:
                          type: boolean
                        isDefault:
                          type: boolean
                        isDeleted:
                          type: boolean
                          description: Whether the object has been soft-deleted.
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp of when the object was created.
                        updatedAt:
                          type: string
                          format: date-time
                          description: >-
                            ISO 8601 timestamp of when the object was last
                            updated.
                        charges:
                          type: array
                          items: {}
                        __v:
                          type: integer
                          description: Internal document version (Mongo).
                  pagination:
                    type: object
                    description: Pagination metadata for the result set.
                    properties:
                      total:
                        type: integer
                        description: >-
                          Total number of records matching the query across all
                          pages.
                      pages:
                        type: integer
                        description: Total number of pages available for the current query.
                      page:
                        type: integer
                        description: >-
                          Current page index (zero-based; matches the `page`
                          query parameter).
                      limit:
                        type: integer
                        description: >-
                          Maximum number of records returned per page (matches
                          the `limit` query parameter).
              example:
                statusCode: 200
                message: Accounts fetched successfully.
                data:
                  - _id: 6a26b1a448fe5e287ce408d0
                    business: 696edb9889c90df3bcdbe067
                    customer: 6a26b14a48fe5e287ce40899
                    type: wallet
                    currency: USD
                    accountName: John Doemain
                    bankCode: SudoHUSMC
                    accountType: Current
                    accountNumber: b9803bdc-5f40-47e2-b3f9-a447a4260cfe
                    currentBalance: 0
                    availableBalance: 0
                    provider: SudoHUSMC
                    providerReference: b9803bdc-5f40-47e2-b3f9-a447a4260cfe
                    referenceCode: b9803bdc-5f40-47e2-b3f9-a447a4260cfe
                    reloadable: true
                    isDefault: false
                    isDeleted: false
                    createdAt: '2026-06-08T12:12:20.345Z'
                    updatedAt: '2026-06-08T12:12:20.345Z'
                    charges: []
                    __v: 0
                  - _id: 6a26b18c48fe5e287ce408b4
                    business: 696edb9889c90df3bcdbe067
                    type: wallet
                    currency: NGN
                    accountName: SUDO / PRIMETECH
                    bankCode: '999240'
                    accountType: Current
                    accountNumber: '5010990188'
                    currentBalance: 0
                    availableBalance: 0
                    provider: SafeHaven
                    providerReference: 6a26b18cd32eea0024e8398c
                    referenceCode: subacc_1780920715820
                    reloadable: true
                    isDefault: true
                    isDeleted: false
                    createdAt: '2026-06-08T12:11:56.272Z'
                    updatedAt: '2026-06-08T12:11:56.272Z'
                    charges: []
                    __v: 0
                  - _id: 6a26a5dbcc75963954c24301
                    business: 696edb9889c90df3bcdbe067
                    type: wallet
                    currency: NGN
                    accountName: SUDO / PRIMETECH
                    bankCode: '999240'
                    accountType: Current
                    accountNumber: '5010070636'
                    currentBalance: 0
                    availableBalance: 0
                    provider: SafeHaven
                    providerReference: 6a26a5dbd32eea0024e835fb
                    referenceCode: subacc_1780917722305
                    reloadable: true
                    isDefault: true
                    isDeleted: false
                    createdAt: '2026-06-08T11:22:03.491Z'
                    updatedAt: '2026-06-08T11:22:03.491Z'
                    charges: []
                    __v: 0
                pagination:
                  total: 8
                  pages: 1
                  page: 0
                  limit: 50
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 400
                message: Invalid pagination parameters.
                data: null
        '401':
          description: Authentication failed — missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Response payload.
              example:
                statusCode: 401
                message: >-
                  Unauthorized. Provide a valid API key in the Authorization
                  header.
                data: null
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````