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

# Get usage history

> Returns a paginated log of credit consumption with endpoint names and form details.



## OpenAPI

````yaml openapi.json get /usage/history
openapi: 3.1.0
info:
  title: GeniusForms API
  description: >-
    AI-powered form builder API. Create forms manually or generate them from
    natural language prompts.
  version: 1.0.0
  contact:
    name: GeniusForms Support
    email: support@geniusforms.ai
    url: https://geniusforms.ai
servers:
  - url: https://geniusforms.ai/api/v1
    description: Production
  - url: http://localhost:8000/api/v1
    description: Local Development
security:
  - ApiKeyAuth: []
paths:
  /usage/history:
    get:
      tags:
        - Usage & Credits
      summary: Get usage history
      description: >-
        Returns a paginated log of credit consumption with endpoint names and
        form details.
      operationId: getUsageHistory
      parameters:
        - name: limit
          in: query
          description: Number of results per page (1-100)
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 100
        - name: offset
          in: query
          description: Number of results to skip
          schema:
            type: integer
            default: 0
            minimum: 0
      responses:
        '200':
          description: Paginated usage history
          content:
            application/json:
              schema:
                type: object
                properties:
                  history:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 42
                        endpoint:
                          type: string
                          example: forms.generate
                        creditsConsumed:
                          type: integer
                          example: 5
                        formId:
                          type: integer
                          nullable: true
                          example: 208
                        formName:
                          type: string
                          nullable: true
                          example: Customer Survey
                        createdAt:
                          type: string
                          format: date-time
                  total:
                    type: integer
                    example: 1
                  hasMore:
                    type: boolean
                    example: false
                  limit:
                    type: integer
                    example: 50
                  offset:
                    type: integer
                    example: 0
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key obtained from your GeniusForms dashboard

````