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

# Export Transactions

> Export transactions as a CSV file (v2, ClickHouse-backed).

Returns up to 10,000 rows matching the given filters. Accepts the same filter
and sort params as the list endpoint. Response is a downloadable ``text/csv`` file.



## OpenAPI

````yaml GET /v2/users/transactions/export
openapi: 3.1.0
info:
  title: Truv Public API
  description: >
    Read-only API for personal access token (PAT) users.


    ## Authentication


    Authenticate with `Authorization: Bearer <token>`. Tokens have a `pat_`
    prefix

    and are generated in the Truv web app under Settings → API keys.


    ## Available Endpoints


    This API exposes a subset of read-only endpoints for retrieving financial
    data,

    account links, and user profile information.
  version: 1.0.0
servers:
  - url: https://api.mytruv.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: users
    description: User profile — read-only access to the authenticated user's profile.
  - name: financial-data
    description: >-
      Financial data — balances, transactions, income, spending, liabilities,
      and balance history.
  - name: links
    description: >-
      Account links — list connected financial institutions and payroll
      providers.
paths:
  /v2/users/transactions/export:
    get:
      tags:
        - financial-data
      summary: Export User Transactions V2
      description: >-
        Export transactions as a CSV file (v2, ClickHouse-backed).


        Returns up to 10,000 rows matching the given filters. Accepts the same
        filter

        and sort params as the list endpoint. Response is a downloadable
        ``text/csv`` file.
      operationId: exportTransactions
      parameters:
        - name: transacted_at_from
          in: query
          required: true
          schema:
            type: string
            description: Start date for the transaction window (inclusive, YYYY-MM-DD).
            examples:
              - '2025-01-01'
            title: Transacted At From
          description: Start date for the transaction window (inclusive, YYYY-MM-DD).
        - name: transacted_at_to
          in: query
          required: false
          schema:
            type: string
            description: >-
              End date for the transaction window (inclusive, YYYY-MM-DD).
              Defaults to today.
            examples:
              - '2025-12-31'
            title: Transacted At To
          description: >-
            End date for the transaction window (inclusive, YYYY-MM-DD).
            Defaults to today.
        - name: categories
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 1000
              - type: 'null'
            description: >-
              Comma-separated category slugs to include (e.g.
              'income,transfer'). Omit to include all categories.
            examples:
              - income,transfer
            title: Categories
          description: >-
            Comma-separated category slugs to include (e.g. 'income,transfer').
            Omit to include all categories.
        - name: transaction_type
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - DEBIT
                  - CREDIT
                type: string
              - type: 'null'
            description: >-
              Filter by transaction type. Omit to include both debits and
              credits.
            examples:
              - DEBIT
            title: Transaction Type
          description: Filter by transaction type. Omit to include both debits and credits.
        - name: account_ids
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated account IDs to include. Omit to include all
              accounts.
            examples:
              - acc_001,acc_002
            title: Account Ids
          description: >-
            Comma-separated account IDs to include. Omit to include all
            accounts.
        - name: min_amount
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            description: Minimum transaction amount (absolute value). Inclusive.
            examples:
              - '10.00'
            title: Min Amount
          description: Minimum transaction amount (absolute value). Inclusive.
        - name: max_amount
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            description: Maximum transaction amount (absolute value). Inclusive.
            examples:
              - '500.00'
            title: Max Amount
          description: Maximum transaction amount (absolute value). Inclusive.
        - name: merchant
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Case-insensitive substring match on merchant name or description.
            examples:
              - starbucks
            title: Merchant
          description: Case-insensitive substring match on merchant name or description.
        - name: exclude_categories
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 1000
              - type: 'null'
            description: >-
              Comma-separated category slugs to exclude (e.g.
              'transfer,uncategorized').
            title: Exclude Categories
          description: >-
            Comma-separated category slugs to exclude (e.g.
            'transfer,uncategorized').
        - name: sort_by
          in: query
          required: false
          schema:
            enum:
              - date
              - amount
            type: string
            description: Sort transactions by date or absolute amount.
            examples:
              - date
            default: date
            title: Sort By
          description: Sort transactions by date or absolute amount.
        - name: sort_order
          in: query
          required: false
          schema:
            enum:
              - asc
              - desc
            type: string
            description: 'Sort direction: ascending or descending.'
            examples:
              - desc
            default: desc
            title: Sort Order
          description: 'Sort direction: ascending or descending.'
      responses:
        '200':
          description: CSV export of up to 10,000 transactions.
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: >-
        Bearer authentication with a personal access token (prefix `pat_`).
        Generate tokens in the Truv web app under Settings → API keys.

````