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

# Count transactions

> Returns the total number of transactions for the authenticated organization.
Optionally filter by `afterDate` to count only transactions created on or after a given date.




## OpenAPI

````yaml https://api.triqai.com/openapi-public.json get /v1/transactions/count
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/count:
    get:
      tags:
        - Transactions
      summary: Count transactions
      description: >
        Returns the total number of transactions for the authenticated
        organization.

        Optionally filter by `afterDate` to count only transactions created on
        or after a given date.
      operationId: countTransactions
      parameters:
        - name: afterDate
          in: query
          required: false
          description: Only count transactions created on or after this ISO 8601 timestamp.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Transaction count
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionCountResponse'
        '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:
    TransactionCountResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: object
          required:
            - count
          properties:
            count:
              type: integer
              minimum: 0
        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

````