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

# List realm accounts

> Lists the accounts of every organization in your realm.

An organization normally has a single account, so the list holds about one item per organization that requested one; each carries the `organizationId` it belongs to. The list is not paginated and has no filters.


## OpenAPI

````yaml /api-reference/banking.openapi.json get /realms/{realmId}/accounts
openapi: 3.0.3
info:
  title: Banking
  version: 1.0.0
  description: >-
    Portão 3 banking API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Banking attaches a zod
    validationSchema at the route; request bodies are resolved from it (object +
    array roots). Responses have no presenter layer, so they stay tier=unknown.
    Confidence tiers: generated:typed=215 copied:manual=4 unknown=52.
servers:
  - url: https://api.banking.v2.portao3.com.br/
    description: production
  - url: https://api.banking.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Accounts
  - name: Account Limits
  - name: Wallets
  - name: Cards
  - name: Card Limits
  - name: Cards 3DS
  - name: PIX
  - name: PIX Keys (DICT)
  - name: PIX Charges
  - name: PIX Automatic
  - name: PIX Initiation (Open Finance)
  - name: PIX Infractions (MED)
  - name: Boleto
  - name: Boleto Charges
  - name: TED
  - name: Transfers
  - name: Transactions
  - name: Cashback
  - name: Currency Codes
  - name: Reversals
paths:
  /realms/{realmId}/accounts:
    get:
      tags:
        - Accounts
      summary: List realm accounts
      description: Lists the accounts of every organization in your realm.
      operationId: getRealmsByRealmIdAccounts
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      description: >-
                        ID of the account. Use it as `{accountId}` in the
                        account, wallet and card endpoints.
                      example: 66f2a1c7b4d3e80012c9a0b4
                    realmId:
                      type: string
                      description: ID of the realm the account belongs to.
                      example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                      format: uuid
                    organizationId:
                      type: string
                      description: ID of the organization that owns the account.
                      example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                      format: uuid
                    legalName:
                      type: string
                      description: Legal name of the company (razão social).
                      example: Transportes Horizonte Ltda
                    tradingName:
                      type: string
                      description: >-
                        Trading name of the company (nome fantasia). Empty when
                        it has none.
                      example: Horizonte Log
                    document:
                      type: string
                      description: CNPJ of the company (14 digits, no punctuation).
                      example: '11222333000181'
                    foundingDate:
                      type: string
                      description: >-
                        Founding date of the company, as `YYYY-MM-DD` (older
                        accounts may carry a full date-time).
                      example: '2015-03-18'
                    businessType:
                      type: string
                      description: >-
                        Legal form of the company, usually one of `LTDA`, `SA`,
                        `EIRELI`, `ME`, `MEI`, `EI`, `SS`, `SLU` or `OUTRO`.
                        Older accounts may carry it as free text.
                      example: LTDA
                    mainActivity:
                      type: string
                      description: >-
                        Main economic activity of the company (CNAE code, 7
                        digits).
                      example: '4930202'
                    email:
                      type: string
                      description: Contact e-mail address of the company.
                      example: financeiro@horizontelog.com.br
                    phoneNumber:
                      type: string
                      description: >-
                        Contact phone number of the company, in E.164 format. A
                        few older accounts keep the format they were registered
                        with.
                      example: '+5511987654321'
                    annualRevenue:
                      type: number
                      description: >-
                        Declared annual revenue, in cents (BRL). Only when it
                        was informed.
                      example: 480000000
                    address:
                      type: object
                      properties:
                        street:
                          type: string
                          description: Street name.
                          example: Avenida Paulista
                        number:
                          type: string
                          description: Street number.
                          example: '1578'
                        complement:
                          type: string
                          description: >-
                            Complement (suite, floor, unit). Empty when there is
                            none.
                          example: Conjunto 42
                        neighborhood:
                          type: string
                          description: Neighborhood.
                          example: Bela Vista
                        city:
                          type: string
                          description: City.
                          example: São Paulo
                        state:
                          type: string
                          description: State, as its two-letter code.
                          example: SP
                        postalCode:
                          type: string
                          description: Postal code (CEP).
                          example: 01310-200
                      required:
                        - street
                        - number
                        - neighborhood
                        - city
                        - state
                        - postalCode
                      description: >-
                        Address of the company. Absent on a few older accounts
                        registered without one.
                    shareholders:
                      type: array
                      items:
                        type: object
                        properties:
                          _id:
                            type: string
                            description: Internal identifier of this shareholder entry.
                            example: 66f2a1c7b4d3e80012c9a0b5
                          type:
                            type: string
                            nullable: true
                            description: >-
                              Role of the shareholder: `PARTNER`, `PROXYHOLDER`
                              (holds a power of attorney) or
                              `LEGAL_REPRESENTATIVE`. Some older accounts carry
                              it in lower case or without a value.
                            example: PARTNER
                          document:
                            type: string
                            description: >-
                              CPF of the person (11 digits), or CNPJ (14 digits)
                              when the partner is a company. Digits only.
                            example: '12345678909'
                          firstName:
                            type: string
                            description: First name of the person.
                            example: Mariana
                          lastName:
                            type: string
                            description: Last name of the person.
                            example: Souza Lima
                          birthDate:
                            type: string
                            description: >-
                              Date of birth of the person, as `YYYY-MM-DD`
                              (older accounts may carry a full date-time).
                            example: '1984-07-22'
                          motherName:
                            type: string
                            description: >-
                              Mother's full name, as registered with the Receita
                              Federal.
                            example: Helena Souza Lima
                          email:
                            type: string
                            description: E-mail address.
                            example: mariana.lima@horizontelog.com.br
                          phoneNumber:
                            type: string
                            description: >-
                              Phone number in E.164 format. Older records may
                              keep the format they were registered with.
                            example: '+5511912345678'
                          legalName:
                            type: string
                            description: Legal name, when the partner is a company.
                            example: Horizonte Participações Ltda
                          tradingName:
                            type: string
                            description: Trading name, when the partner is a company.
                            example: Horizonte Participações
                          mainActivity:
                            type: string
                            description: >-
                              Main economic activity (CNAE code, 7 digits), when
                              the partner is a company.
                            example: '6463800'
                          foundingDate:
                            type: string
                            description: >-
                              Founding date, when the partner is a company, as
                              `YYYY-MM-DD`.
                            example: '2012-05-02'
                          annualRevenue:
                            type: number
                            description: >-
                              Declared income, in cents (BRL). Only when it was
                              informed.
                            example: 1500000
                          address:
                            type: object
                            properties:
                              street:
                                type: string
                                description: Street name.
                                example: Avenida Paulista
                              number:
                                type: string
                                description: Street number.
                                example: '1578'
                              complement:
                                type: string
                                description: >-
                                  Complement (suite, floor, unit). Empty when
                                  there is none.
                                example: Conjunto 42
                              neighborhood:
                                type: string
                                description: Neighborhood.
                                example: Bela Vista
                              city:
                                type: string
                                description: City.
                                example: São Paulo
                              state:
                                type: string
                                description: State, as its two-letter code.
                                example: SP
                              postalCode:
                                type: string
                                description: Postal code (CEP).
                                example: 01310-200
                            required:
                              - street
                              - number
                              - neighborhood
                              - city
                              - state
                              - postalCode
                            description: Address of the shareholder.
                          status:
                            type: array
                            items:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  description: Internal identifier of this entry.
                                  example: 66f2a1c7b4d3e80012c9a0b6
                                status:
                                  type: string
                                  enum:
                                    - PENDING
                                    - IN_ANALYSIS
                                    - APPROVED
                                    - REPROVED
                                    - EXPIRED
                                  description: >-
                                    Result of the shareholder's identity
                                    verification: `PENDING` (submitted, being
                                    processed), `IN_ANALYSIS` (under manual
                                    review), `APPROVED`, `REPROVED` or `EXPIRED`
                                    (it expired before a verdict).
                                  example: APPROVED
                                environment:
                                  type: string
                                  enum:
                                    - LIVE
                                    - TEST
                                  description: Environment this result belongs to.
                                  example: LIVE
                                analysisResult:
                                  type: array
                                  items:
                                    type: string
                                    example: identity_verification_approved
                                  description: >-
                                    Reasons given by the verification, such as
                                    `identity_verification_approved` or
                                    `identity_verification_rejected`. Empty when
                                    none were given.


                                    ---


                                    Example:
                                    `["identity_verification_approved"]`
                                createdAt:
                                  type: string
                                  description: When the verification was submitted.
                                  example: '2024-09-24T13:02:11.000Z'
                                  format: date-time
                                updatedAt:
                                  type: string
                                  description: When the result last changed.
                                  example: '2024-09-24T13:18:40.000Z'
                                  format: date-time
                                approvedAt:
                                  type: string
                                  description: >-
                                    When the verification was approved. Set when
                                    the result reaches `APPROVED` and kept if it
                                    changes afterwards — read `status` for the
                                    current result.
                                  example: '2024-09-24T13:18:40.000Z'
                                  format: date-time
                              required:
                                - status
                                - environment
                                - analysisResult
                              description: >-
                                One identity-verification result of a
                                shareholder, per environment.
                            description: >-
                              Identity-verification results of the shareholder,
                              one per environment. Empty when none was run.
                        required:
                          - document
                        description: >-
                          A partner, proxy holder or legal representative of the
                          company. Most are people (identified by CPF); a
                          partner that is itself a company is identified by its
                          CNPJ and carries the company fields instead of the
                          personal ones.
                      description: >-
                        Partners, proxy holders and legal representatives of the
                        company.
                    walletProduct:
                      type: string
                      description: >-
                        Product tier of the account: `NORMAL`, `SUPER`, `BLACK`,
                        `RETRANSFER`, `PRODUCT_08` or `PRODUCT_09`. It sets
                        which product new wallets and cards are issued under.
                      example: NORMAL
                    status:
                      type: array
                      items:
                        type: object
                        properties:
                          _id:
                            type: string
                            description: Internal identifier of this entry.
                            example: 66f2a1c7b4d3e80012c9a0b7
                          environment:
                            type: string
                            enum:
                              - LIVE
                              - TEST
                            description: >-
                              Environment this status belongs to: `LIVE`
                              (production) or `TEST` (sandbox).
                            example: LIVE
                          status:
                            type: string
                            enum:
                              - IN_ANALYSIS
                              - REPROVED
                              - OPEN
                              - CLOSED
                              - BLOCKED
                              - INACTIVE
                              - MANUAL_ANALYSIS
                            description: >-
                              Status of the account in this environment:

                              - `IN_ANALYSIS` — the opening request is being
                              analyzed.

                              - `MANUAL_ANALYSIS` — the analysis was routed to a
                              manual review.

                              - `OPEN` — the account is open: wallets, cards and
                              payments can be used.

                              - `REPROVED` — the opening request was rejected;
                              `analysisResult` says why.

                              - `BLOCKED` — the account was blocked and can't
                              move money.

                              - `INACTIVE` — the account was deactivated at the
                              company's request.

                              - `CLOSED` — the account was closed.
                            example: OPEN
                          analysisResult:
                            type: array
                            items:
                              type: string
                              nullable: true
                              example: validated_data
                            description: >-
                              Reasons given by the opening analysis, such as
                              `validated_data` on an approval, or
                              `reproved_partners`, `partners_are_missing`,
                              `legal_name_mismatch` or
                              `cnpj_inapt_on_receita_federal` on a rejection.
                              Empty when none were given; older accounts may
                              hold empty or `null` entries.


                              ---


                              Example: `["validated_data"]`
                          defaultWalletId:
                            type: string
                            description: >-
                              ID of the organization's default wallet in this
                              environment. Present once the account is open and
                              that wallet exists.
                            example: 66f2a1d0b4d3e80012c9a0b9
                          openedAt:
                            type: string
                            description: >-
                              When the account was requested in this
                              environment.
                            example: '2024-09-24T13:02:11.000Z'
                            format: date-time
                          closedAt:
                            type: string
                            nullable: true
                            description: >-
                              When the account was closed. Only on some closed
                              accounts, and may be `null`.
                            example: '2025-02-10T18:30:00.000Z'
                            format: date-time
                          cardHolder:
                            type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - IN_ANALYSIS
                                  - APPROVED
                                  - REPROVED
                                description: >-
                                  Result of the card holder's identity
                                  verification: `IN_ANALYSIS`, `APPROVED` or
                                  `REPROVED`.
                                example: APPROVED
                              analysisResult:
                                type: array
                                items:
                                  type: string
                                description: >-
                                  Reasons given by the analysis. Empty when none
                                  were given.
                              createdAt:
                                type: string
                                description: When the analysis started.
                                example: '2024-09-24T13:20:45.000Z'
                                format: date-time
                              updatedAt:
                                type: string
                                description: When the result last changed.
                                example: '2024-09-24T13:41:02.000Z'
                                format: date-time
                              approvedAt:
                                type: string
                                description: >-
                                  When it was approved. Set when `status`
                                  reaches `APPROVED` and kept if it changes
                                  afterwards — read `status` for the current
                                  result.
                                example: '2024-09-24T13:41:02.000Z'
                                format: date-time
                            required:
                              - status
                            description: >-
                              Identity verification of the card holder
                              registered for the company. Present once a card
                              holder was registered, which normally happens
                              while the account is opened.
                          createdAt:
                            type: string
                            description: When this environment's entry was created.
                            example: '2024-09-24T13:02:11.000Z'
                            format: date-time
                          updatedAt:
                            type: string
                            description: When this environment's status last changed.
                            example: '2024-09-24T13:20:45.000Z'
                            format: date-time
                        required:
                          - environment
                          - status
                          - analysisResult
                        description: Status of the account in one environment.
                      description: >-
                        Status of the account in each environment it was
                        requested in. An account has one entry per environment —
                        usually just `LIVE`.
                    bankingProvider:
                      type: string
                      description: >-
                        Internal code of the banking partner that holds the
                        account. You never need it to call this API.
                    external:
                      type: array
                      items:
                        type: object
                        properties:
                          _id:
                            type: string
                            description: Internal identifier of this entry.
                            example: 66f2a1c7b4d3e80012c9a0b8
                          environment:
                            type: string
                            enum:
                              - LIVE
                              - TEST
                            description: Environment these references belong to.
                            example: LIVE
                          accountHolderId:
                            type: string
                            description: Reference of the company as an account holder.
                            example: 0b7e3d52-8c1a-4f6e-9d2b-5a4c3e1f0d97
                          treasuryAccountHolderId:
                            type: string
                            description: >-
                              Reference of the company as a holder of the
                              account that keeps the balances.
                            example: 5e2c9a14-7b3d-4c8f-a6e1-2d9b0f4c8a63
                          treasuryAccountId:
                            type: string
                            description: Reference of the account that keeps the balances.
                            example: c81f4e07-2a6b-4d93-b5e8-7f1a0c3d9b42
                          prepaidTreasuryAccountId:
                            type: string
                            description: >-
                              Reference of the account's prepaid balance
                              account, when it has one.
                            example: e4a7c2b9-0d3f-4e61-8b5a-9c2d1f7e3a08
                          cardHolderId:
                            type: string
                            description: >-
                              Reference of the card holder registered for the
                              company. Present once one was registered, which
                              normally happens while the account is opened.
                            example: 7d3b1e9a-4c2f-4a8d-b6e0-1f5c9a2d7b34
                          accountType:
                            type: string
                            description: >-
                              Kind of account at the banking partner. Not set on
                              current accounts.
                          productId:
                            type: string
                            description: >-
                              Code of the account's product, which follows
                              `walletProduct`.
                            example: portao3_product_02
                          accountRequestId:
                            type: string
                            description: >-
                              Reference of the opening request, when the account
                              was opened through one.
                            example: 2f9d6b3a-8e1c-4b7a-9d05-6c3e2a1f8b70
                          companyStatuteOcrId:
                            type: string
                            description: >-
                              Reference of the company's articles of association
                              read during the analysis.
                            example: a1c5e9f3-6b2d-4e8a-9c71-3d0f5b2e7a19
                          contractOcrId:
                            type: string
                            description: >-
                              Reference of the company's social contract read
                              during the analysis.
                            example: d6b2f8a4-1e9c-4c3d-8a57-0b4e2f9c6d31
                          partnersOcr:
                            type: array
                            items:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  description: Internal identifier of this entry.
                                  example: 66f2a1c7b4d3e80012c9a0ba
                                document:
                                  type: string
                                  description: >-
                                    CPF of the shareholder the document belongs
                                    to. Digits only.
                                  example: '12345678909'
                                documentType:
                                  type: string
                                  enum:
                                    - CNH
                                    - RG
                                  description: >-
                                    Kind of identity document: `CNH` (driver's
                                    license) or `RG` (identity card).
                                  example: CNH
                                ocrFrontId:
                                  type: string
                                  nullable: true
                                  description: Reference of the front image.
                                  example: 3b0f6f5e-6a3e-4b4e-9a54-6c1f0b2d9e11
                                ocrBackId:
                                  type: string
                                  nullable: true
                                  description: Reference of the back image.
                                  example: 9c2a7d41-1f0e-4e8b-a3c2-0d6e5b4f7a22
                              required:
                                - document
                                - documentType
                                - ocrFrontId
                                - ocrBackId
                              description: >-
                                A document image read during the account's
                                opening analysis.
                            description: >-
                              Identity documents of the shareholders read during
                              the analysis. Usually empty.
                          fundsinBagId:
                            type: string
                            description: >-
                              Present only on accounts migrated from an earlier
                              setup.
                            example: 4c8e2a6f-9b1d-4f3a-8e75-2a0c6d9b1f53
                          fundsinDictId:
                            type: string
                            nullable: true
                            description: >-
                              Present only on accounts migrated from an earlier
                              setup.
                            example: 8f1b5d9c-3a7e-4c2b-9f60-1d4a8e2c7b95
                          migratedAt:
                            type: string
                            description: >-
                              When the account was migrated from an earlier
                              setup. Present only on those accounts.
                            example: '2024-03-11T09:00:00.000Z'
                            format: date-time
                          createdAt:
                            type: string
                            description: When these references were recorded.
                            example: '2024-09-24T13:02:11.000Z'
                            format: date-time
                          updatedAt:
                            type: string
                            description: When these references last changed.
                            example: '2024-09-24T13:20:45.000Z'
                            format: date-time
                        required:
                          - environment
                        description: >-
                          References of the account at Portão 3's banking
                          partner, in one environment. You never need them to
                          call this API: identify the account by its `_id`.
                      description: >-
                        References of the account at the banking partner, one
                        entry per environment.
                    createdAt:
                      type: string
                      description: When the account was created.
                      example: '2024-09-24T13:02:11.000Z'
                      format: date-time
                    updatedAt:
                      type: string
                      description: When the account last changed.
                      example: '2024-09-24T13:20:45.000Z'
                      format: date-time
                    __v:
                      type: number
                      description: Internal revision counter of the record.
                      example: 0
                  required:
                    - _id
                    - realmId
                    - organizationId
                    - legalName
                    - tradingName
                    - document
                    - foundingDate
                    - businessType
                    - mainActivity
                    - email
                    - phoneNumber
                    - shareholders
                    - status
                    - bankingProvider
                    - external
                    - createdAt
                    - updatedAt
                  description: >-
                    The organization's account: the company's registration data,
                    its shareholders and its status in each environment. An
                    organization normally has a single account.
        '422':
          description: '`BAD_REQUEST` — The realm ID is not a valid UUID; `fields` lists it.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: BANKING
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: realmId
                    message: Invalid UUID
                    code: REALMID_UUID

````

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