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

# PublicApiGetCreditHistory

> GET /api/v1/organizations/{orgId}/billing/credits/history

Use this endpoint through the Developer API or the matching `firstsales` CLI command when available. Responses use the stable FirstSales public error envelope.


## OpenAPI

````yaml GET /api/v1/organizations/{orgId}/billing/credits/history
openapi: 3.1.0
info:
  title: FirstSales Developer API
  version: 1.0.0
  description: >-
    Public v1 developer API for FirstSales.io. Generated from live step
    definitions — do not hand-edit.
servers:
  - url: https://sandbox.api.app.firstsales.io
  - url: https://api.app.firstsales.io
security:
  - bearerAuth: []
tags:
  - name: Activities
  - name: Alerts
  - name: API Keys
  - name: Authentication
  - name: Billing
  - name: Blocked Domains
  - name: Campaigns
  - name: Companies
  - name: Connectors
  - name: Contacts
  - name: Copilot
  - name: Dashboard
  - name: Deals
  - name: Direct Email
  - name: Email Authentication
  - name: Inbox
  - name: Knowledge Bases
  - name: Learning
  - name: Offerings
  - name: Organizations
  - name: Product Updates
  - name: Sequence Library
  - name: Signals
    description: >-
      Beta. Find people who comment on or react to LinkedIn posts by a keyword,
      a person or a company page. Each scan costs 10x the scraper cost in
      credits (1 credit = $0.01), capped by the daily budget of the signal. A
      scan that adds no new person is free.
  - name: Suppression
  - name: Team
  - name: Tracking Domains
  - name: Warmup
paths:
  /api/v1/organizations/{orgId}/billing/credits/history:
    get:
      tags:
        - Billing
      summary: PublicApiGetCreditHistory
      operationId: listBillingCreditHistory
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: from
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: action
          in: query
          required: false
          schema:
            type: string
            enum:
              - manual_email
              - ai_email_standard
              - ai_email_premium
              - lead_find
              - lead_deep_enrich
              - lead_probe
              - maps_find
              - maps_enrich
              - ai_research_standard
              - ai_research_premium
              - ai_signature_polish
              - learning_sample_batch
              - learning_rerank_draft
              - learning_model_refresh
              - contact_cleaning
              - contact_cleaning_refund
              - copilot_turn
              - copilot_contact_import
              - copilot_research
              - copilot_briefing
              - thin_domain_enrichment
              - signal_scan
              - admin_refund
        - name: campaignId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCreditHistoryResponse'
        '400':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '401':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '403':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '404':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '429':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '500':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        '503':
          description: Public API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorEnvelope'
      security:
        - developerKeyBearer: []
components:
  schemas:
    PublicCreditHistoryResponse:
      type: object
      properties:
        logs:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              id:
                anyOf:
                  - type: string
                  - type: 'null'
              action:
                type: string
              actionResourceId:
                anyOf:
                  - type: string
                  - type: 'null'
              workspaceId:
                anyOf:
                  - type: string
                  - type: 'null'
              campaignId:
                anyOf:
                  - type: string
                  - type: 'null'
              creditsConsumed:
                type: number
              consumedAt:
                anyOf:
                  - type: string
              balanceAfter:
                anyOf:
                  - type: number
                  - type: 'null'
              refundedAt:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - id
              - action
              - actionResourceId
              - workspaceId
              - campaignId
              - creditsConsumed
              - consumedAt
            additionalProperties: false
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - logs
        - total
      additionalProperties: false
    PublicErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - requestId
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Legacy compatibility bearer scheme for generated consumers.
    developerKeyBearer:
      type: http
      scheme: bearer
      description: FirstSales developer API key bearer token (fs-key-*).

````

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