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

# List credit usage

> Owner or admin only. Returns one page of credit events, newest first: every credit used, added, refunded or adjusted. Pass `next_cursor` back as `cursor` for the next page; it is null on the last page. The default period is the last 30 days.




## OpenAPI

````yaml /openapi/billing.yaml get /workspaces/{workspaceId}/billing/usage-log
openapi: 3.1.0
info:
  title: Connie Billing API
  version: 1.0.0
  description: >
    Endpoints the Connie web app uses for billing. They authenticate with your
    signed-in browser session — see
    https://docs.connie.ai/api-reference/authentication. These are the app's own
    endpoints and can change when the app changes.
servers:
  - url: https://connie.ai/api
security:
  - sessionCookie: []
tags:
  - name: Credits
    description: >
      The workspace's credit balance. Any member can read the balance and plan
      prices; plan details and everything else in Billing are for workspace
      owners and admins only.
  - name: Plan
    description: The workspace's plan and subscription. Owners and admins only.
  - name: Usage log
    description: >-
      Every credit used or added, as shown in Settings > Logs. Owners and admins
      only.
paths:
  /workspaces/{workspaceId}/billing/usage-log:
    get:
      tags:
        - Usage log
      summary: List credit usage
      description: >
        Owner or admin only. Returns one page of credit events, newest first:
        every credit used, added, refunded or adjusted. Pass `next_cursor` back
        as `cursor` for the next page; it is null on the last page. The default
        period is the last 30 days.
      operationId: listCreditUsage
      parameters:
        - $ref: '#/components/parameters/workspaceId'
        - $ref: '#/components/parameters/q'
        - $ref: '#/components/parameters/period'
        - $ref: '#/components/parameters/from'
        - $ref: '#/components/parameters/to'
        - $ref: '#/components/parameters/movement'
        - $ref: '#/components/parameters/category'
        - $ref: '#/components/parameters/actionKey'
        - $ref: '#/components/parameters/actorId'
        - $ref: '#/components/parameters/surface'
        - $ref: '#/components/parameters/recordId'
        - $ref: '#/components/parameters/amountMin'
        - $ref: '#/components/parameters/amountMax'
        - $ref: '#/components/parameters/includeLegacy'
        - name: cursor
          in: query
          description: The `next_cursor` from the previous page.
          schema:
            type: string
        - name: limit
          in: query
          description: Page size, at most 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        '200':
          description: A page of credit events.
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/CreditEvent'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                  limit:
                    type: integer
                  range:
                    $ref: '#/components/schemas/UsageRange'
        '400':
          $ref: '#/components/responses/BadQuery'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/AdminOnly'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    workspaceId:
      name: workspaceId
      in: path
      required: true
      description: The workspace id, as in the app URL `connie.ai/<workspaceId>/...`.
      schema:
        type: string
        format: uuid
    q:
      name: q
      in: query
      description: Search text, 2 to 200 characters.
      schema:
        type: string
        minLength: 2
        maxLength: 200
    period:
      name: period
      in: query
      description: >
        Time window. `billing_period` is the current billing period. `custom`
        uses `from` and `to` and is implied when either is given. Defaults to
        `30d`.
      schema:
        type: string
        enum:
          - today
          - 7d
          - 30d
          - billing_period
          - custom
        default: 30d
    from:
      name: from
      in: query
      description: >-
        Start of a custom range, as `YYYY-MM-DD` or an ISO date-time. Only with
        `period=custom`.
      schema:
        type: string
    to:
      name: to
      in: query
      description: >-
        End of a custom range, as `YYYY-MM-DD` (that whole day is included) or
        an ISO date-time.
      schema:
        type: string
    movement:
      name: movement
      in: query
      description: Only credits used, added, or refunded and adjusted.
      schema:
        type: string
        enum:
          - used
          - added
          - refunded_adjusted
    category:
      name: category
      in: query
      description: One or more categories, repeated or comma-separated.
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: '#/components/schemas/CreditCategory'
    actionKey:
      name: action_key
      in: query
      description: >-
        One or more exact actions, such as `tool.used`. Repeated or
        comma-separated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
    actorId:
      name: actor_id
      in: query
      description: >-
        Who triggered the event, as a user id or an API key id, or `system`.
        Repeated or comma-separated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
    surface:
      name: surface
      in: query
      description: Where the credits were used. Repeated or comma-separated.
      style: form
      explode: true
      schema:
        type: array
        items:
          $ref: '#/components/schemas/CreditSurface'
    recordId:
      name: record_id
      in: query
      description: Only events charged to these records. Repeated or comma-separated.
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
          format: uuid
    amountMin:
      name: amount_min
      in: query
      description: Smallest credit amount per event, ignoring sign.
      schema:
        type: number
        minimum: 0
    amountMax:
      name: amount_max
      in: query
      description: Largest credit amount per event, ignoring sign.
      schema:
        type: number
        minimum: 0
    includeLegacy:
      name: include_legacy
      in: query
      description: Include older imported history. Pass `false` to hide it.
      schema:
        type: boolean
        default: true
  schemas:
    CreditEvent:
      type: object
      properties:
        event_id:
          type: string
        occurred_at:
          type: string
          format: date-time
        action_key:
          type: string
          example: tool.used
        action_label:
          type: string
          description: The action as the app shows it.
        category:
          $ref: '#/components/schemas/CreditCategory'
        credit_delta:
          type: number
          description: Credits added (positive) or used (negative).
        balance_before:
          type: number
        balance_after:
          type: number
        actor_type:
          type: string
          description: '`user`, `api_key` or `system`.'
        actor_id:
          type:
            - string
            - 'null'
        actor_display_name:
          type:
            - string
            - 'null'
        actor_email:
          type:
            - string
            - 'null'
        surface:
          type:
            - string
            - 'null'
        source_type:
          type:
            - string
            - 'null'
          description: >-
            The kind of thing that used the credits, such as a workflow or a
            record.
        source_id:
          type:
            - string
            - 'null'
        source_display_name:
          type:
            - string
            - 'null'
        source_url:
          type:
            - string
            - 'null'
          description: In-app link to the source, when it still exists.
        run_id:
          type:
            - string
            - 'null'
        request_id:
          type:
            - string
            - 'null'
        related_event_id:
          type:
            - string
            - 'null'
          description: For a refund, the charge it reverses.
        attribution_quality:
          type: string
        metadata:
          type:
            - object
            - 'null'
          description: Extra details such as the tool, model or token counts.
          additionalProperties: true
        email_receipt:
          description: For a Send Email charge, who it went to.
          oneOf:
            - type: 'null'
            - type: object
              properties:
                recipients:
                  type:
                    - string
                    - 'null'
                subject:
                  type:
                    - string
                    - 'null'
                thread_url:
                  type:
                    - string
                    - 'null'
                hidden:
                  type:
                    - string
                    - 'null'
                  description: Why the details are withheld from you, if they are.
    UsageRange:
      type: object
      description: The window the results cover.
      properties:
        from:
          type:
            - string
            - 'null'
          format: date-time
        to:
          type:
            - string
            - 'null'
          format: date-time
        search_capped:
          type: integer
          description: >-
            Present when a search was limited to the newest N events of the
            period.
    CreditCategory:
      type: string
      enum:
        - ai
        - enrichment
        - workflow
        - tool_integration
        - grant
        - purchase
        - refund
        - adjustment
    CreditSurface:
      type: string
      description: >-
        Where the credits were used, such as Chat (`ai_chat`), MCP, an API key
        or a workflow.
      enum:
        - ai_chat
        - mcp
        - agent
        - workflow
        - ui_enrichment
        - api_key
        - managed_app
        - system
    Error:
      type: object
      properties:
        error:
          type: string
          description: A readable message.
        code:
          type: string
          description: A machine-readable code, when the route sets one.
  responses:
    BadQuery:
      description: >-
        A query parameter is invalid (`VALIDATION_ERROR`); the message says
        which.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: No valid session, or the session has expired (`SESSION_EXPIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AdminOnly:
      description: >-
        You are not a member of this workspace, or you are not an owner or
        admin.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >-
        Too many requests (`RATE_LIMIT_EXCEEDED`). Wait for the `Retry-After`
        seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: header
      name: Cookie
      description: >-
        The full Cookie header copied from a signed-in connie.ai browser
        request. See the Authentication page.

````

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