> ## 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.

# Export an account's transactions by e-mail

> Exports the account's transactions to a CSV or XLSX file and e-mails a download link, instead of answering with them.

The request only queues the export: it answers `204` (no body) right away, and the e-mail — to `userToNotify.email` — arrives once the file is ready, with a download link that expires (6 days after it is sent at the latest, so download it soon). The file holds one page of the account's transactions list, newest first: send the same filters (`startDate`, `endDate`, `walletId`, `cardId`, `financialImpactType`, `transactionTypes`, `internalTransaction`, `description`, `debitParty`) and set `limit` to how many it may hold — it defaults to 15. Pick the format with `type`. Send `x-environment: LIVE` for production transactions.

If the export fails after the request was accepted, no e-mail is sent. Only organization admins can export the account.


## OpenAPI

````yaml /api-reference/banking.openapi.json post /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/transactions-async
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=300 copied:manual=0 unknown=20.
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: Transaction Limits
  - name: Transfers
  - name: Cards
  - name: Card Limits
  - name: Cards 3DS
  - name: Pix Payments
  - name: Pix Keys
  - name: PIX Charges
  - name: PIX Automatic
  - name: PIX Initiation (Open Finance)
  - name: PIX Infractions (MED)
  - name: Boleto Payments
  - name: Boleto Charges
  - name: TED Payments
  - name: Transactions
  - name: Transaction Reversals
  - name: Spend Review
  - name: Cashback
  - name: Currency Codes
paths:
  /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/transactions-async:
    post:
      tags:
        - Transactions
      summary: Export an account's transactions by e-mail
      description: >-
        Exports the account's transactions to a CSV or XLSX file and e-mails a
        download link, instead of answering with them.
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdTransactionsAsync
      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
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization the account belongs to.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: accountId
          in: path
          required: true
          description: ID of the organization's account (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 66f2a1c7b4d3e80012c9a0b4
        - name: x-environment
          in: header
          required: false
          description: >-
            Environment of the transactions: `LIVE` (production) or `TEST`
            (sandbox). When you omit it, you get the `TEST` transactions; any
            other value is rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
        - name: startDate
          in: query
          required: false
          description: >-
            Start of the period, inclusive, compared with each transaction's
            `effectiveAt`: an ISO 8601 date-time (`2026-11-01T03:00:00.000Z`) or
            date (`2026-11-01`, read as midnight UTC). The period applies only
            when you send both `startDate` and `endDate`.
          schema:
            type: string
          example: '2026-11-01T03:00:00.000Z'
        - name: endDate
          in: query
          required: false
          description: >-
            End of the period, inclusive, in the same format as `startDate`. A
            date alone (`2026-11-30`) is midnight UTC at the start of that day,
            so the rest of the day is left out.
          schema:
            type: string
          example: '2026-12-01T02:59:59.999Z'
        - name: financialImpactType
          in: query
          required: false
          description: >-
            Only transactions with these effects on the balance
            (case-insensitive, comma-separated for several): `DEBIT` (money
            out), `CREDIT` (money in) or `NONE` (no effect, such as a declined
            card purchase or a failed transfer). Other values match no
            transaction.


            ---


            Example (comma-separated list): `?financialImpactType=DEBIT,CREDIT`
          schema:
            type: array
            items:
              type: string
              maxLength: 64
          style: form
          explode: false
        - name: transactionTypes
          in: query
          required: false
          description: >-
            Only transactions of these kinds (case-insensitive, comma-separated
            for several): `CARD` (card purchases, their settlements and
            refunds), `PIX` (Pix sent and received, and their refunds), `BOLETO`
            (boletos paid and received), `FEE` (fees) or `P2P` (transfers
            between wallets at Portão 3). TED transfers have no kind here: they
            are listed only when you send no `transactionTypes`.


            ---


            Example (comma-separated list): `?transactionTypes=PIX,BOLETO`
          schema:
            type: array
            items:
              type: string
              enum:
                - CARD
                - PIX
                - BOLETO
                - FEE
                - P2P
          style: form
          explode: false
        - name: description
          in: query
          required: false
          description: >-
            Only transactions whose card merchant name, Pix counterparty name,
            boleto payee or payer, or fee description contains this text. When
            you send it, `debitParty` is ignored.
          schema:
            type: string
            maxLength: 256
          example: Papelaria
        - name: debitParty
          in: query
          required: false
          description: >-
            Only Pix whose payer has this CPF or CNPJ (digits only, as stored):
            the Pix received from them — or, with your own organization's
            document, the Pix you sent. Ignored when you also send
            `description`.
          schema:
            type: string
            maxLength: 64
          example: '12345678000190'
        - name: walletId
          in: query
          required: false
          description: >-
            Only the transactions of this wallet of the account (24 hexadecimal
            characters), or `default` for the organization's main wallet.
          schema:
            type: string
            pattern: ^([0-9a-fA-F]{24}|default)$
          example: 66f2a3d1b4d3e80012c9a0d2
        - name: cardId
          in: query
          required: false
          description: >-
            Only the transactions of these cards (24 hexadecimal characters
            each, comma-separated for several).


            ---


            Example (comma-separated list):
            `?cardId=66f2a4b8b4d3e80012c9a0e1,66f2a4b8b4d3e80012c9a0e2`
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
          style: form
          explode: false
        - name: internalTransaction
          in: query
          required: false
          description: >-
            `true` for only the transfers between wallets at Portão 3 (`P2P`) —
            ignored when `transactionTypes` includes `P2P`, which then decides
            alone. `false`, like omitting it, applies no filter.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          example: 'true'
        - name: type
          in: query
          required: false
          description: 'Format of the file: `csv` (the default) or `xlsx`. Case-insensitive.'
          schema:
            type: string
            enum:
              - csv
              - xlsx
          example: xlsx
        - name: next
          in: query
          required: false
          description: >-
            Cursor of a transactions list page (its `next`) to start the file
            after, sent with the same filters. Omit it to start at the newest
            transaction.
          schema:
            type: string
          example: NjZmMmE3ZTliNGQzZTgwMDEyYzlhMTEy
        - name: limit
          in: query
          required: false
          description: >-
            Most transactions the file holds, newest first. Defaults to 15 — 20
            when you filter by `description` or `debitParty` — so send a larger
            value (such as 10000) for a full statement.
          schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          example: 15
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userToNotify:
                  type: object
                  properties:
                    email:
                      type: string
                      format: email
                      pattern: >-
                        ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                      description: E-mail address the download link is sent to.
                      example: mariana.costa@acme.com.br
                    firstName:
                      description: Name the e-mail greets.
                      example: Mariana
                      type: string
                  required:
                    - email
                  description: >-
                    Who receives the e-mail with the download link. Any address
                    you send gets it.
              required:
                - userToNotify
      responses:
        '204':
          description: No Content. The operation succeeded and the response has no body.
        '403':
          description: '`FORBIDDEN_WALLET` — You are not an admin of the organization.'
          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:
                      - FORBIDDEN_WALLET
                    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.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: FORBIDDEN_WALLET
                origin: BANKING
                message: >-
                  You do not have permission to perform this action on this
                  wallet
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter, a query parameter or
            `userToNotify` is invalid or missing; `fields` lists each one.
          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: userToNotify
                    message: 'Invalid input: expected object, received undefined'
                    code: USERTONOTIFY_REQUIRED

````

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