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

# Batch delete transactions

> Delete multiple transactions in a single request. Provide exactly **one** of:
- `all: true` — delete every transaction for the organization
- `afterDate` — delete all transactions created on or after the given ISO 8601 date
- `ids` — delete specific transactions by UUID (max 1000)

Associated KV cache entries and DLQ entries are purged after deletion.




## OpenAPI

````yaml https://api.triqai.com/openapi-public.json delete /v1/transactions/batch
openapi: 3.1.0
info:
  title: Triqai Transaction Enrichment API
  version: 1.4.0
  description: >
    The Triqai API provides transaction enrichment capabilities for financial
    applications.


    ## Authentication


    All API endpoints require an API key in the `X-API-Key` header.


    ## Rate Limiting


    Per-organization limits use a token bucket (RPS) plus a concurrent in-flight
    cap.

    Headers may include:

    - `X-RateLimit-Limit`

    - `X-RateLimit-Remaining`

    - `X-RateLimit-Reset`

    - `X-RateLimit-Scope` (`rps` or `concurrency`)

    - `X-RateLimit-Concurrency-Limit`

    - `X-RateLimit-Concurrency-Remaining`


    `Retry-After` is returned in **seconds** on throttled responses.


    ## Idempotency


    You must supply `Idempotency-Key` (or `X-Idempotency-Key`) for enrichment
    requests so retries preserve billing and persistence identity.

    Keys must match `^[a-zA-Z0-9_-]{1,64}$`.

    Reusing a key returns `409`:

    - `state=completed`: request with this key already finished

    - `state=in_progress`: request with this key is still processing
    (`Retry-After` included)
  contact:
    name: Triqai Contact
    url: https://triqai.com/contact
  license:
    name: Proprietary
    url: https://triqai.com/terms
servers:
  - url: https://api.triqai.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Health
  - name: API
  - name: Transactions
  - name: Categories
  - name: Entities
  - name: Issue Reports
paths:
  /v1/transactions/batch:
    delete:
      tags:
        - Transactions
      summary: Batch delete transactions
      description: >
        Delete multiple transactions in a single request. Provide exactly
        **one** of:

        - `all: true` — delete every transaction for the organization

        - `afterDate` — delete all transactions created on or after the given
        ISO 8601 date

        - `ids` — delete specific transactions by UUID (max 1000)


        Associated KV cache entries and DLQ entries are purged after deletion.
      operationId: batchDeleteTransactions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDeleteRequest'
            examples:
              delete_all:
                summary: Delete all transactions
                value:
                  all: true
              delete_by_date:
                summary: Delete transactions after a date
                value:
                  afterDate: '2026-01-01T00:00:00Z'
              delete_by_ids:
                summary: Delete specific transactions
                value:
                  ids:
                    - f353ca91-4fc5-49f2-9b9e-304f83d11914
                    - a1b2c3d4-e5f6-7890-abcd-ef1234567890
      responses:
        '200':
          description: Batch deletion completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchDeleteResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    BatchDeleteRequest:
      type: object
      description: |
        Provide exactly one of `all`, `afterDate`, or `ids`.
      oneOf:
        - required:
            - all
          properties:
            all:
              type: boolean
              enum:
                - true
              description: When `true`, deletes all transactions for the organization.
        - required:
            - afterDate
          properties:
            afterDate:
              type: string
              format: date-time
              description: Delete all transactions created on or after this date.
        - required:
            - ids
          properties:
            ids:
              type: array
              description: Delete specific transactions by UUID (max 1000).
              maxItems: 1000
              items:
                type: string
                format: uuid
    BatchDeleteResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - deleted
            - count
          properties:
            deleted:
              type: boolean
              enum:
                - true
            count:
              type: integer
              minimum: 0
              description: Number of transactions deleted.
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    ResponseMeta:
      type: object
      required:
        - generatedAt
        - requestId
        - version
      properties:
        generatedAt:
          type: string
          format: date-time
        requestId:
          type: string
        version:
          type: string
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorObject'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/ErrorDetails'
    ErrorDetails:
      type: object
      properties:
        fieldErrors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      additionalProperties: true
  responses:
    Unauthorized:
      description: Authentication failed or missing credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authentication_error
              message: API key is required
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    Forbidden:
      description: Authenticated but not authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authorization_error
              message: Access denied
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: validation_error
              message: Validation failed
              details:
                fieldErrors:
                  title:
                    - Title is required
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    RateLimited:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Requests per second (sustained rate)
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Current token-bucket capacity available
        X-RateLimit-Reset:
          schema:
            type: string
            format: date-time
          description: Timestamp when token bucket refills
        X-RateLimit-Scope:
          schema:
            type: string
            enum:
              - rps
              - concurrency
          description: Active limiting dimension
        X-RateLimit-Concurrency-Limit:
          schema:
            type: integer
          description: Max concurrent requests for the org
        X-RateLimit-Concurrency-Remaining:
          schema:
            type: integer
          description: Remaining concurrent request slots
        Retry-After:
          schema:
            type: integer
          description: Seconds until retry is allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: rate_limited
              message: Rate limit exceeded
            meta:
              generatedAt: '2026-02-16T00:00:00Z'
              requestId: f353ca91-4fc5-49f2-9b9e-304f83d11914
              version: 1.1.2
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Public API key

````