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

# Get credit transactions

> The credit transaction log: every ledger transaction in a date window, or of one statement line (`groupKey`), newest first, with its signed amount, credit type, timestamp, the user who triggered it, the contact or company it was for and the statement context it belongs to (activity, advanced-workflow run, campaign, top-up). Same filters as GET /v1/credits/statement, with `costMin` and `costMax` bounding each transaction's absolute amount; page with `limit` and `offset`. Workspace admins only: with an API key, the key creator must be a workspace admin; over MCP, the connected user. Available to workspaces the feature is enabled for.

    > **Required scope:** `WORKSPACE_READ`
    >
    > **Rate limit:** 100 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json get /v1/credits/transactions
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/credits/transactions:
    get:
      tags:
        - Credits
      summary: Get credit transactions
      description: >-
        The credit transaction log: every ledger transaction in a date window,
        or of one statement line (`groupKey`), newest first, with its signed
        amount, credit type, timestamp, the user who triggered it, the contact
        or company it was for and the statement context it belongs to (activity,
        advanced-workflow run, campaign, top-up). Same filters as GET
        /v1/credits/statement, with `costMin` and `costMax` bounding each
        transaction's absolute amount; page with `limit` and `offset`. Workspace
        admins only: with an API key, the key creator must be a workspace admin;
        over MCP, the connected user. Available to workspaces the feature is
        enabled for.

            > **Required scope:** `WORKSPACE_READ`
            >
            > **Rate limit:** 100 requests per minute
      parameters:
        - schema:
            type: string
            description: >-
              Inclusive start of the window, ISO 8601. Defaults to 30 days
              before `toDate`. The window may span at most 366 days.
            example: '2026-10-01T00:00:00Z'
          required: false
          description: >-
            Inclusive start of the window, ISO 8601. Defaults to 30 days before
            `toDate`. The window may span at most 366 days.
          name: fromDate
          in: query
        - schema:
            type: string
            description: Inclusive end of the window, ISO 8601. Defaults to now.
            example: '2026-10-31T23:59:59Z'
          required: false
          description: Inclusive end of the window, ISO 8601. Defaults to now.
          name: toDate
          in: query
        - schema:
            type: string
            default: '50'
            description: Rows per page, 1 to 100. Defaults to 50.
          required: false
          description: Rows per page, 1 to 100. Defaults to 50.
          name: limit
          in: query
        - schema:
            type: string
            default: '0'
            description: >-
              Rows to skip, for pagination. Defaults to 0. `offset + limit` may
              not exceed 10000: narrow the window with `fromDate` and `toDate`
              to read further back. Later pages must pass the `fromDate` and
              `toDate` the first response echoed, or spend recorded in between
              shifts every page.
          required: false
          description: >-
            Rows to skip, for pagination. Defaults to 0. `offset + limit` may
            not exceed 10000: narrow the window with `fromDate` and `toDate` to
            read further back. Later pages must pass the `fromDate` and `toDate`
            the first response echoed, or spend recorded in between shifts every
            page.
          name: offset
          in: query
        - schema:
            type: array
            items:
              type: string
              minLength: 1
            maxItems: 60
            description: >-
              Credit types to keep, as the Credits page labels them: ledger
              types such as `ENRICH_LEAD_EMAIL`, `VERIFY_EMAIL`,
              `SCRAPE_LEAD_LINKEDIN` or `TOPUP_PLAN` (see GET
              /v1/credits/pricing for the spend actions), and the AI splits
              `AI_MESSAGE`, `AI_ENRICHMENT`, `AI_VARIABLE_CAMPAIGN`, `AI_CHAT`
              and `AI_COMPLETION`. Comma-separated or repeated; through MCP, an
              array.
            example:
              - ENRICH_LEAD_EMAIL
              - AI_ENRICHMENT
          required: false
          description: >-
            Credit types to keep, as the Credits page labels them: ledger types
            such as `ENRICH_LEAD_EMAIL`, `VERIFY_EMAIL`, `SCRAPE_LEAD_LINKEDIN`
            or `TOPUP_PLAN` (see GET /v1/credits/pricing for the spend actions),
            and the AI splits `AI_MESSAGE`, `AI_ENRICHMENT`,
            `AI_VARIABLE_CAMPAIGN`, `AI_CHAT` and `AI_COMPLETION`.
            Comma-separated or repeated; through MCP, an array.
          name: types
          in: query
        - schema:
            type: array
            items:
              type: integer
              exclusiveMinimum: 0
            maxItems: 200
            description: >-
              Only charges triggered by these Enginy user ids (the `user.id` of
              a line). Comma-separated or repeated; through MCP, an array.
            example:
              - 12
              - 34
          required: false
          description: >-
            Only charges triggered by these Enginy user ids (the `user.id` of a
            line). Comma-separated or repeated; through MCP, an array.
          name: userIds
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            description: Lower bound on the absolute credit amount, inclusive.
            example: 10
          required: false
          description: Lower bound on the absolute credit amount, inclusive.
          name: costMin
          in: query
        - schema:
            type:
              - integer
              - 'null'
            minimum: 0
            description: Upper bound on the absolute credit amount, inclusive.
            example: 5000
          required: false
          description: Upper bound on the absolute credit amount, inclusive.
          name: costMax
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Only the transactions of one statement line, by the `groupKey` GET
              /v1/credits/statement returned (`process:<id>`, `run:<id>`,
              `campaign:<id>`, `topup:<transactionId>`,
              `single:<transactionId>`). Omit for every transaction in the
              window.
            example: process:4821
          required: false
          description: >-
            Only the transactions of one statement line, by the `groupKey` GET
            /v1/credits/statement returned (`process:<id>`, `run:<id>`,
            `campaign:<id>`, `topup:<transactionId>`, `single:<transactionId>`).
            Omit for every transaction in the window.
          name: groupKey
          in: query
      responses:
        '200':
          description: Credit transactions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      fromDate:
                        type: string
                        format: date-time
                        description: Inclusive start of the requested window.
                      toDate:
                        type: string
                        format: date-time
                        description: Inclusive end of the requested window.
                      limit:
                        type: integer
                      offset:
                        type: integer
                      total:
                        type: integer
                        description: Number of matching transactions, for pagination.
                      transactions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Ledger transaction id.
                            createdAt:
                              type: string
                              format: date-time
                              description: When the credits were charged or added.
                            amount:
                              type: integer
                              description: >-
                                Signed credits: negative for spend, positive for
                                top-ups.
                            type:
                              type: string
                              description: >-
                                Credit type as the Credits page labels it;
                                `AI_COMPLETION` rows are split into
                                `AI_MESSAGE`, `AI_ENRICHMENT`,
                                `AI_VARIABLE_CAMPAIGN` and `AI_CHAT` by what
                                generated them.
                            user:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  description: Enginy user id; usable as `userIds`.
                                name:
                                  type:
                                    - string
                                    - 'null'
                                email:
                                  type: string
                              required:
                                - id
                                - name
                                - email
                              description: >-
                                The user who triggered the charge; null for
                                system spend and top-ups.
                            workflowStatus:
                              type:
                                - string
                                - 'null'
                              description: >-
                                Status of the enrichment workflow that charged
                                it; null for run-keyed and conversation spend.
                            entity:
                              type:
                                - object
                                - 'null'
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - contact
                                    - company
                                id:
                                  type: integer
                                name:
                                  type: string
                                companyName:
                                  type:
                                    - string
                                    - 'null'
                                  description: The contact's company, for a contact.
                              required:
                                - kind
                                - id
                                - name
                                - companyName
                              description: >-
                                The contact or company the charge was for, when
                                known. Blocklisted entities are never named.
                            groupKey:
                              type: string
                              description: >-
                                The statement line the transaction belongs to
                                (see GET /v1/credits/statement).
                            kind:
                              type: string
                              enum:
                                - process
                                - run
                                - campaign
                                - topup
                                - single
                              description: >-
                                What the credits were spent on: `process` an
                                enrichment or import activity, `run` an
                                advanced-workflow run, `campaign` AI messages of
                                a campaign, `topup` a top-up or plan movement,
                                `single` a charge with no linkable context.
                                Exactly one of `process`, `run` and `campaign`
                                is set, matching `kind`.
                            process:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                  description: >-
                                    Activity (process) id, as on the Activity
                                    page.
                                workflowType:
                                  type: string
                                  description: >-
                                    The workflow type the activity ran, e.g.
                                    `ENRICH_WITH_EMAIL`.
                                listName:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The list the activity ran on, when it ran on
                                    one.
                              required:
                                - id
                                - workflowType
                                - listName
                            run:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: string
                                  description: Advanced-workflow run id.
                                advancedWorkflowId:
                                  type: integer
                                name:
                                  type: string
                                  description: Name of the advanced workflow.
                              required:
                                - id
                                - advancedWorkflowId
                                - name
                            campaign:
                              type:
                                - object
                                - 'null'
                              properties:
                                id:
                                  type: integer
                                name:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    Campaign name; null when the campaign no
                                    longer exists.
                              required:
                                - id
                                - name
                          required:
                            - id
                            - createdAt
                            - amount
                            - type
                            - user
                            - workflowStatus
                            - entity
                            - groupKey
                            - kind
                            - process
                            - run
                            - campaign
                        description: Transactions, newest first.
                    required:
                      - fromDate
                      - toDate
                      - limit
                      - offset
                      - total
                      - transactions
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            Bad request - an invalid date, a reversed window, a window longer
            than 366 days, a malformed `groupKey`, or invalid filters
        '403':
          description: >-
            The credit statement and transaction log are not enabled for this
            workspace yet. Contact Enginy support to enable them. Also answered
            when the caller is not a workspace admin: Only workspace admins can
            read the credit statement and transaction log. With an API key, the
            key must have been created by a workspace admin; over MCP, connect
            as a workspace admin.
        '408':
          description: >-
            The read exceeded its time limit. Narrow the window with fromDate
            and toDate or add filters, then retry.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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