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

# Update transaction

> Updates transaction details, or marks or unmarks a transaction as spam.

Omitted fields keep their current values. Accounting-state and accounting-period restrictions apply.

To change the spam state, send only `{ "spam": true }` or `{ "spam": false }`. A spam change runs the same steps as in the Entendre app: posted-journal checks, asset cleanup and cost-basis reconciliation. A reconciliation error does not undo the spam change.

This operation does not change tags.


## OpenAPI

````yaml openapi-public-preview.json PATCH /v1/transactions/{transaction_id}
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
paths:
  /v1/transactions/{transaction_id}:
    patch:
      tags:
        - Transactions
      summary: Update transaction
      description: >-
        Update the memo, transaction type or spam state. Accounting-state and
        period restrictions apply. Transaction tags are not supported by this
        operation.
      operationId: update_transaction
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: ID of the transaction.
          schema:
            type: string
            minLength: 1
          example: txn_507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    transaction_type:
                      description: >-
                        Economic transaction type. This does not classify
                        accounting or create a journal entry. Case-insensitive
                        on input. Pass `null` to clear.
                      anyOf:
                        - $ref: '#/components/schemas/TransactionCategory'
                        - type: 'null'
                    category:
                      deprecated: true
                      description: >-
                        Older name for `transaction_type`. Case-insensitive on
                        input. Pass `null` to clear.
                      anyOf:
                        - $ref: '#/components/schemas/TransactionCategory'
                        - type: 'null'
                    classification:
                      deprecated: true
                      description: >-
                        Older name for `transaction_type`. Send only one type
                        field. Case-insensitive on input. Pass `null` to clear.
                      anyOf:
                        - $ref: '#/components/schemas/TransactionCategory'
                        - type: 'null'
                    memo:
                      type:
                        - string
                        - 'null'
                      description: Free-text memo. Pass `null` to clear.
                - type: object
                  additionalProperties: false
                  required:
                    - spam
                  properties:
                    spam:
                      type: boolean
                      description: >-
                        Set or clear the spam flag. This also performs asset
                        cleanup and reconciliation. Send this field separately
                        from memo or transaction-type changes.
            example:
              transaction_type: BILL
              memo: Annual infrastructure cost
      responses:
        '200':
          description: The request succeeded.
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Transaction'
                  reconciliation:
                    type: object
                    description: >-
                      Present only after a spam change. Shows whether the
                      cost-basis reconciliation was queued.
                    required:
                      - queued
                      - scope
                      - job_id
                      - error
                    properties:
                      queued:
                        type: boolean
                        description: '`true` when the reconciliation job was queued.'
                      scope:
                        type: string
                        enum:
                          - none
                          - source_asset
                          - organization
                        description: The records that the reconciliation recalculates.
                      job_id:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The reconciliation job ID, or `null` when no job was
                          queued.
                      error:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Why the reconciliation could not be queued. The spam
                          change is kept.
                required:
                  - data
                additionalProperties: false
              example:
                data:
                  id: txn_507f1f77bcf86cd799439011
                  account_id: null
                  organization_id: org_507f1f77bcf86cd799439011
                  legal_entity_id: le_507f1f77bcf86cd799439011
                  source_class: fiat
                  provider: plaid
                  vendor: null
                  provider_category: null
                  external:
                    timestamp: '2026-08-31T12:00:00Z'
                    description: Customer deposit
                    direction: credit
                    quantity: null
                    currency: USD
                    value_fiat:
                      gross: '100.00'
                      fee: '0.00'
                      net: '100.00'
                      currency: USD
                  crypto: null
                  bank:
                    bank_name: Example Bank
                    account_last4: '4242'
                    counterparty_name: Example Customer
                  card: null
                  internal:
                    transaction_type: DEPOSIT
                    status: pending
                    memo: null
                    journal_entry_id: null
                  created_at: null
                  updated_at: null
                  tag_ids:
                    - tag_507f1f77bcf86cd799439011
        '400':
          description: >-
            The request is invalid. `error.fields` lists the fields to correct.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid path, query or request body.
                  request_id: req_example
        '401':
          description: The API key is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Authentication is required.
                  request_id: req_example
        '403':
          description: >-
            The API key does not have the required scope or is not associated
            with a user, or the action needs a review in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Insufficient access to organization
                  request_id: req_example
        '404':
          description: The resource does not exist, or your organization cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: Resource not found
                  request_id: req_example
        '409':
          description: >-
            The current state of the resource or an accounting rule prevents
            this operation. Read the resource again before you choose another
            action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: The resource state does not allow this operation.
                  request_id: req_example
        '429':
          description: >-
            Too many requests. If the response has a `Retry-After` header, wait
            that many seconds before you retry. Otherwise, read `error.message`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit exceeded. Retry after 30s.
                  request_id: req_example
        '500':
          description: >-
            An unexpected error occurred. A write can still have taken effect;
            check the resource before you retry. Give the `request_id` to
            support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INTERNAL_ERROR
                  message: Internal server error
                  request_id: req_example
        '503':
          description: >-
            A service that this operation needs is unavailable. If the response
            has a `Retry-After` header, wait that many seconds. Check for
            earlier accepted work before you send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: SERVICE_UNAVAILABLE
                  message: Service unavailable.
                  request_id: req_example
components:
  schemas:
    TransactionCategory:
      type: string
      description: >-
        Economic transaction type. Some values contain spaces, such as `INTERNAL
        TRANSFER`.
      enum:
        - DEPOSIT
        - WITHDRAWAL
        - SWAP
        - NON_TAXABLE_CONVERSION
        - BRIDGE
        - INTERCOMPANY TRANSFER
        - INTERNAL TRANSFER
        - FEE
        - MINTING
        - STAKING_REWARD
        - VALIDATOR_REWARD
        - INVOICE
        - BILL
        - CLAIM REWARD
        - BORROW
        - REPAYMENT
        - RESERVES CHANGE
        - REALIZED_PNL
        - INCOME
        - EXPENSE
        - REFUND
        - CHARGEBACK
        - NFT
        - SPAM
        - UNKNOWN
    Transaction:
      type: object
      required:
        - id
        - account_id
        - organization_id
        - legal_entity_id
        - source_class
        - external
        - internal
      properties:
        id:
          type: string
          examples:
            - txn_abc123
          description: Transaction ID (`txn_…`).
        sequence_number:
          type:
            - string
            - 'null'
          description: >-
            Sequence number, such as `OT-1234`. It is assigned shortly after
            creation, so it is `null` in the create response.
        account_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the source of the transaction. Use it in the `account_id`
            filter of List transactions.
        organization_id:
          type: string
          description: Organization ID (`org_…`).
        legal_entity_id:
          type: string
          description: Legal entity ID (`le_…`).
        source_class:
          type: string
          enum:
            - crypto
            - fiat
            - card
            - exchange
            - other
          description: 'Kind of source: `crypto`, `fiat`, `card`, `exchange` or `other`.'
        provider:
          type: string
          enum:
            - wallet
            - fireblocks
            - plaid
            - ramp
            - rain
            - kraken
            - binance
            - coinbase
            - coinbase_prime
            - coinbase_exchange
            - coinbase_international
            - deribit
            - bitmex
            - bybit
            - kucoin
            - gate
            - mexc
            - gemini
            - woo
            - okx
            - bitfinex
            - circle
            - canton
            - niural
            - finch_payroll
          description: Provider that the transaction came from.
        vendor:
          type:
            - string
            - 'null'
          description: >-
            Counterparty name, or `null` when unknown. Can be bank text when
            there is no merchant name.
        provider_category:
          type:
            - string
            - 'null'
          description: >-
            Raw category metadata assigned by Ramp or Plaid. It is not
            accounting treatment.
        external:
          type: object
          properties:
            timestamp:
              type: string
              format: date-time
              description: Time of the transaction (ISO 8601).
            description:
              type: string
              description: Description from the provider.
            direction:
              type: string
              enum:
                - credit
                - debit
              description: >-
                `credit` for money in, `debit` for money out, relative to the
                source.
            quantity:
              type:
                - object
                - 'null'
              description: >-
                Token quantity breakdown (crypto only). `null` for fiat/card
                transactions.
              properties:
                gross:
                  type: string
                  description: >-
                    Gross token quantity before fees. For a 1.5 ETH transfer
                    with 0.003 ETH gas, `gross` is `"1.5"`.
                fee:
                  type: string
                  description: >-
                    Token fee deducted (such as gas in native token). Same unit
                    as `currency`.
                net:
                  type: string
                  description: Net token quantity after fees (`gross - fee`).
            currency:
              type: string
              description: Token symbol (crypto) or ISO 4217 (fiat).
            value_fiat:
              $ref: '#/components/schemas/ValueFiat'
          description: The transaction as the provider reported it.
        crypto:
          type:
            - object
            - 'null'
          description: Present when `source_class` is `crypto`. `null` otherwise.
          properties:
            chain:
              type: string
              description: Blockchain network, such as `eth`.
            asset_type:
              type: string
              description: Asset symbol, such as `ETH`.
            from_address:
              type: string
              description: Sending address.
            to_address:
              type: string
              description: Receiving address.
            hash:
              type: string
              description: On-chain transaction hash.
        bank:
          type:
            - object
            - 'null'
          description: Bank details for fiat transactions.
          properties:
            bank_name:
              type: string
              description: Bank name.
            account_last4:
              type: string
              description: Last four digits of the bank account.
            counterparty_name:
              type: string
              description: Counterparty name from the bank.
            merchant_id:
              type: string
              description: >-
                Stable merchant ID from Plaid. Use it to group transactions by
                merchant.
            category_version:
              type: string
              description: Version of the Plaid category taxonomy.
            category_confidence:
              type: string
              description: Plaid confidence in the category.
            running_balance:
              type: string
              description: >-
                Account balance after the transaction, when the bank reports it
                (decimal string).
            correction_status:
              type: string
              description: Status of a bank correction to this transaction.
            correction_reason:
              type: string
              description: Reason for the bank correction.
            bank_removed:
              type: boolean
              description: '`true` when the bank removed the transaction.'
            counterparties:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                    description: Counterparty name.
                  entity_id:
                    type: string
                    nullable: true
                    description: Plaid entity ID of the counterparty.
                  type:
                    type: string
                    nullable: true
                    description: >-
                      Counterparty type, such as merchant or payment
                      intermediary.
                  confidence:
                    type: string
                    nullable: true
                    description: Plaid confidence in the counterparty.
              description: Counterparties that Plaid identified.
        card:
          type:
            - object
            - 'null'
          description: Present when `source_class` is `card`. `null` otherwise.
          properties:
            merchant_name:
              type: string
              description: Merchant name.
            merchant_category:
              type: string
              description: Merchant category.
            card_last4:
              type: string
              description: Last four digits of the card.
            employee_name:
              type: string
              description: Cardholder name.
        internal:
          type: object
          properties:
            transaction_type:
              allOf:
                - $ref: '#/components/schemas/TransactionCategory'
              description: >-
                Economic transaction type. The linked journal shows the
                accounting treatment.
            status:
              type: string
              enum:
                - pending
                - posted
                - spam
              description: '`pending`, `posted` or `spam`.'
            memo:
              type:
                - string
                - 'null'
              description: Memo.
            journal_entry_id:
              type:
                - string
                - 'null'
              description: >-
                Prefixed ID of the associated journal entry (such as
                `je_abc123`). `null` if no journal entry has been posted.
          description: How Entendre records the transaction.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Time the transaction was imported (ISO 8601).
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: ISO 8601 timestamp of the last update.
        tag_ids:
          type: array
          items:
            type: string
            description: Tag ID (`tag_…`).
            example: tag_507f1f77bcf86cd799439011
          maxItems: 100
          uniqueItems: true
          description: Tag IDs (`tag_…`).
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
    ValueFiat:
      type: object
      description: >-
        Fiat values as decimal strings: `gross` is quantity × unit price, `fee`
        is token fee × unit price, and `net` is gross − fee.
      required:
        - gross
        - net
        - currency
      properties:
        gross:
          type: string
          description: >-
            Total fiat value before fees (`quantity × unit price`). Used as the
            line amount for journal entries.
        fee:
          type: string
          description: >-
            Fee in fiat terms (`token fee × unit price`). `"0.00"` if no fee.
            When non-zero, the fee is typically posted as a separate
            FEE-classified transaction.
        net:
          type: string
          description: Fiat value after fees (`gross − fee`).
        currency:
          type: string
          description: ISO 4217 currency code (such as `USD`, `EUR`).
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. Some operations also need a key that is
        associated with a user; their pages say so.

````