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

# Get customer metrics

> Returns customer lifecycle metrics: active, churned, new, and reactivated customer counts with comparison to the prior period.



## OpenAPI

````yaml /api-reference/v2/specs/2026-04-01.json get /insights/customers
openapi: 3.1.0
info:
  title: Alguna Public API
  version: '2026-04-01'
servers:
  - url: https://api.alguna.io
security:
  - bearerAuth: []
tags:
  - name: Billing Events and Metrics
  - name: Credit Notes
  - name: Credits
  - name: Customer Portal Sessions
  - name: Customers
  - name: Insights
  - name: Invoices
  - name: Payments
  - name: Plans
  - name: Product Bundles
  - name: Products
  - name: Refunds
  - name: Revenue Schedules
  - name: Subscription Changes
  - name: Subscription Versions
  - name: Subscriptions
  - name: Wallet Grants
  - name: Wallets
paths:
  /insights/customers:
    get:
      tags:
        - Insights
      summary: Get customer metrics
      description: >-
        Returns customer lifecycle metrics: active, churned, new, and
        reactivated customer counts with comparison to the prior period.
      operationId: get-customer-insights
      parameters:
        - in: header
          name: Alguna-Version
          required: true
          schema:
            enum:
              - '2026-04-01'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerInsightsResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    CustomerInsightsResponse:
      properties:
        active_customer_count:
          description: Number of currently active customers
          example: 150
          format: int64
          type: integer
        active_customer_count_previous:
          description: Number of active customers in the previous period
          example: 142
          format: int64
          type: integer
        churned_previous_period:
          description: Customers who churned in the previous period
          example: 5
          format: int64
          type: integer
        churned_this_period:
          description: Customers who churned in the current period
          example: 3
          format: int64
          type: integer
        new_previous_period:
          description: New customers in the previous period
          example: 6
          format: int64
          type: integer
        new_this_period:
          description: New customers in the current period
          example: 8
          format: int64
          type: integer
        reactivated_previous_period:
          description: Reactivated customers in the previous period
          example: 1
          format: int64
          type: integer
        reactivated_this_period:
          description: Reactivated customers in the current period
          example: 2
          format: int64
          type: integer
      required:
        - active_customer_count
        - active_customer_count_previous
        - churned_previous_period
        - churned_this_period
        - new_previous_period
        - new_this_period
        - reactivated_previous_period
        - reactivated_this_period
      type: object
    ErrorResponse:
      properties:
        detail:
          type: string
        status:
          format: int64
          type: integer
      required:
        - status
        - detail
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````