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

> The Credits page statement: one line per spend context inside a date window — an enrichment or import activity (`process`), an advanced-workflow run (`run`), the AI messages of a campaign (`campaign`), a top-up or plan movement (`topup`) or a charge with no linkable context (`single`) — with its signed credit total, transaction count, charged credit types and the user it is attributed to, newest first. Filter by window, triggering users, credit types and the absolute line total; page with `limit` and `offset`. Pass a line's `groupKey` to GET /v1/credits/transactions to list its transactions. Spend is negative and top-ups positive, so the lines of a full window sum to the balance movement of GET /v1/credits over it. `effectiveFromDate` says when a high-volume window was narrowed. 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/statement
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/statement:
    get:
      tags:
        - Credits
      summary: Get credit statement
      description: >-
        The Credits page statement: one line per spend context inside a date
        window — an enrichment or import activity (`process`), an
        advanced-workflow run (`run`), the AI messages of a campaign
        (`campaign`), a top-up or plan movement (`topup`) or a charge with no
        linkable context (`single`) — with its signed credit total, transaction
        count, charged credit types and the user it is attributed to, newest
        first. Filter by window, triggering users, credit types and the absolute
        line total; page with `limit` and `offset`. Pass a line's `groupKey` to
        GET /v1/credits/transactions to list its transactions. Spend is negative
        and top-ups positive, so the lines of a full window sum to the balance
        movement of GET /v1/credits over it. `effectiveFromDate` says when a
        high-volume window was narrowed. 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
      responses:
        '200':
          description: Credit statement 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.
                      effectiveFromDate:
                        type: string
                        format: date-time
                        description: >-
                          Start of the window actually covered. Later than
                          `fromDate` when the workspace had more ledger rows in
                          the window than the statement scans (the newest
                          25,000): sums are then exact within
                          [effectiveFromDate, toDate] only, so request the rest
                          with `toDate` just before it.
                      limit:
                        type: integer
                      offset:
                        type: integer
                      totalLines:
                        type: integer
                        description: Number of lines in the covered window, for pagination.
                      lines:
                        type: array
                        items:
                          type: object
                          properties:
                            groupKey:
                              type: string
                              description: >-
                                Stable key of the line: `process:<id>`,
                                `run:<id>`, `campaign:<id>`,
                                `topup:<transactionId>` or
                                `single:<transactionId>`. Pass it as `groupKey`
                                to GET /v1/credits/transactions to list the
                                line's transactions.
                            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
                            types:
                              type: array
                              items:
                                type: string
                              description: >-
                                Credit types charged on the line (at most 5 are
                                listed), as `types` filters them.
                            totalAmount:
                              type: integer
                              description: >-
                                Signed sum of the line's transactions in
                                credits: negative for spend, positive for
                                top-ups.
                            transactionCount:
                              type: integer
                              description: Number of ledger transactions on the line.
                            firstAt:
                              type: string
                              format: date-time
                              description: >-
                                Timestamp of the line's oldest transaction in
                                the window.
                            lastAt:
                              type: string
                              format: date-time
                              description: >-
                                Timestamp of the line's newest transaction in
                                the window.
                            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: >-
                                Who the line is attributed to: the user who
                                started the activity or run, else the user who
                                triggered its first charge. Null for system
                                spend and automatic plan movements.
                          required:
                            - groupKey
                            - kind
                            - process
                            - run
                            - campaign
                            - types
                            - totalAmount
                            - transactionCount
                            - firstAt
                            - lastAt
                            - user
                        description: Statement lines, newest activity first.
                    required:
                      - fromDate
                      - toDate
                      - effectiveFromDate
                      - limit
                      - offset
                      - totalLines
                      - lines
                required:
                  - status
                  - message
                  - data
        '400':
          description: >-
            Bad request - an invalid date, a reversed window, a window longer
            than 366 days, 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.