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

# List usage records

> List ClosedLoop AI credit-consumption records for the current team, filtered by date and returned with pagination for billing transparency.



## OpenAPI

````yaml /api-reference/openapi.yaml get /usage
openapi: 3.0.3
info:
  title: ClosedLoop AI Public API
  version: 1.8.3
  x-logo:
    url: https://app.closedloop.sh/favicon.svg
    altText: ClosedLoop AI
  description: >
    # ClosedLoop AI Public API


    Programmatic access to your team's **product insights**, the structured
    intelligence

    ClosedLoop AI extracts from customer conversations (Gong, Fireflies, Slack,
    …) and

    structured feedback (surveys, webhooks).


    Pull insights, themes, features, customer context and analytics into your
    own tools.


    ## Two ways to integrate


    | | **This REST API** | **MCP** (live today) |

    |---|---|---|

    | Best for | server-to-server, dashboards, ETL, scripts | AI assistants
    (Claude, Cursor, …), agents |

    | Shape | resource endpoints, JSON | tool calls over the Model Context
    Protocol |

    | Auth | `X-API-Key` header | OAuth |


    Most agentic use cases are already covered by MCP. Reach for this REST API
    when you

    want plain HTTP resources.


    ## Base URLs (region-scoped)


    Your API key belongs to a **team**, and each team lives in exactly one
    region. Use the

    base URL for **your** region. A key issued in the EU only works against the
    EU host.


    | Region | Base URL |

    |---|---|

    | United States | `https://api.closedloop.sh/v1` |

    | European Union | `https://eu.api.closedloop.sh/v1` |


    ## Authentication


    Create a key in **Settings → API Keys** in the app, then send it on every
    request:


    ```

    X-API-Key: clai_live_xxxxxxxxxxxxxxxxxxxx

    ```


    Keys are **team-scoped**: every response is automatically limited to your
    team's data.

    Never expose a key in client-side code.


    ## Conventions


    - **Read-only**: every v1 endpoint is a `GET`; nothing is mutated. Feedback
    is ingested
      through your connected integrations, not this API.
    - **Pagination**: list endpoints accept `limit` (default 50, max 200) and
    `offset`.
      `/insights` also supports incremental export with `updated_since` and a cursor.
    - **Errors**: non-2xx responses return a JSON `{ error, code, hint?,
    request_id }` body.
      Quote `request_id` (also in the `X-Request-ID` header) when you contact support.
    - **Rate limits**: semantic search is rate limited. On `429`, wait for the
      `Retry-After` time before retrying.
    - **Linking insights and context**: both carry `customer_id`, so you can
    filter either
      list by the same customer.
    - **Time anchors**: timestamps are ISO 8601 (UTC).
  contact:
    name: ClosedLoop AI Support
    email: support@closedloop.sh
    url: https://closedloop.sh
  license:
    name: Proprietary (ClosedLoop Labs LLC)
    url: https://closedloop.sh/terms
servers:
  - url: https://api.closedloop.sh/v1
    description: United States (production)
  - url: https://eu.api.closedloop.sh/v1
    description: European Union (production)
security:
  - ApiKeyAuth: []
tags:
  - name: Insights
    description: |
      Individual **product insights**: structured, AI-processed feedback items
      (pain point, severity, workaround, competitor gap, evidence).
  - name: Products
    description: >-
      The current product, product-area, and feature-area vocabulary for the
      team.
  - name: Themes
    description: >
      **Themes**: top-level groups of related problems, RIC-scored. The

      "what should we build?" surface. Each theme rolls up one or more buildable
      features.
  - name: Features
    description: >
      **Features**: the buildable, shippable children of a theme. Filter by
      `theme_id`.

      Same theme → features hierarchy you see on the roadmap.
  - name: Customers
    description: The people and accounts who gave feedback, with CRM context.
  - name: Context
    description: >
      **Customer context**: churn reasons, competitor mentions, satisfaction,
      pricing

      perception and more, taken from conversations. Each record is an
      interpretation of

      what a customer said; check the original conversation before treating it
      as fact.
  - name: Competitors
    description: >
      Competitive pressure derived from your customers' own words. Competitors
      with a

      **mention trend over time** (not a static total), and a searchable feed of
      the exact

      mentions, each showing the customer behind it.
  - name: Analytics
    description: Trends, cohorts and facet counts over the full dataset.
  - name: Integrations
    description: Connected data sources for your team.
  - name: Usage
    description: Credit consumption and usage records for billing transparency.
  - name: Meta
    description: Service metadata.
paths:
  /usage:
    get:
      tags:
        - Usage
      summary: List usage records
      description: Credit consumption records for billing transparency.
      parameters:
        - $ref: '#/components/parameters/DateFrom'
        - $ref: '#/components/parameters/DateTo'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: A page of usage records
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/UsageRecord'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '503':
          $ref: '#/components/responses/AuthenticationUnavailable'
components:
  parameters:
    DateFrom:
      name: date_from
      in: query
      schema:
        type: string
        format: date
        pattern: ^\d{4}-\d{2}-\d{2}$
      example: '2026-05-01'
      description: Start date (inclusive), `YYYY-MM-DD`. Other formats return `400`.
    DateTo:
      name: date_to
      in: query
      schema:
        type: string
        format: date
        pattern: ^\d{4}-\d{2}-\d{2}$
      example: '2026-05-31'
      description: End date (inclusive), `YYYY-MM-DD`. Other formats return `400`.
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 200
      description: Page size (max 200).
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        default: 0
        minimum: 0
      description: Number of records to skip.
  schemas:
    UsageRecord:
      type: object
      required:
        - id
        - type
        - credits
        - timestamp
      properties:
        id:
          type: string
          format: uuid
          example: 05a6e100-0000-4000-8000-000000000001
        type:
          type: string
          example: feedback_processing
        credits:
          type: integer
          example: 5
        source:
          type: string
          example: gong_call_abc123
        timestamp:
          type: string
          format: date-time
          example: '2026-05-14T10:32:00Z'
    Pagination:
      type: object
      required:
        - total
        - limit
        - offset
      properties:
        total:
          type: integer
          description: Total matching records (full set, not the page).
          example: 508
        limit:
          type: integer
          example: 50
        offset:
          type: integer
          example: 0
    Error:
      type: object
      required:
        - error
        - code
        - request_id
      properties:
        error:
          type: string
          description: User-safe message.
        code:
          type: string
          example: INVALID_API_KEY
        hint:
          type: string
          description: Optional next step.
        request_id:
          type: string
          description: >-
            Identifier of this request, equal to the `X-Request-ID` response
            header. Quote it when you contact support.
          example: 3f2b8c1e-5d4a-4e6f-9a7b-2c1d0e9f8a7b
  responses:
    AuthenticationUnavailable:
      description: Authentication is temporarily unavailable
      headers:
        X-Request-ID:
          $ref: '#/components/headers/XRequestId'
        Retry-After:
          schema:
            type: integer
            example: 10
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            authentication:
              summary: Authentication unavailable
              value:
                error: >-
                  API key authentication is temporarily unavailable. Please
                  retry shortly.
                code: API_KEY_AUTH_UNAVAILABLE
  headers:
    XRequestId:
      description: >
        Identifier of this request. Every error response returns it here and as
        `request_id`

        in the JSON body; quote it when you contact support.
      schema:
        type: string
        example: 3f2b8c1e-5d4a-4e6f-9a7b-2c1d0e9f8a7b
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Team-scoped API key created in the app (Settings → API Keys).
        Sent as `X-API-Key: <key>` on every request. The header name `apikey`
        is also accepted as an alias.

````

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