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

# Get source lead metrics.

> Returns lead creation metrics for one business intake source, including accepted, rejected, duplicate, validation, and recent activity counts for monitoring.



## OpenAPI

````yaml /openapi.json get /sources/{id}/metrics
openapi: 3.0.4
info:
  title: Leadping API
  description: >-
    Leadping API for lead intake, messaging, calling, automations, billing,
    business settings, and compliant lead communication workflows.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
  - url: https://api.leadping.ai
    description: Production
security: []
tags:
  - name: Analytics
  - name: Automations
  - name: Contact
  - name: Conversations
  - name: Dispositions
  - name: Feedback
  - name: Leads
  - name: LeadStatuses
  - name: Notifications
  - name: OutboundDelivery
  - name: Sources
  - name: Suppressions
  - name: Tags
  - name: Users
  - name: Calls
  - name: PhoneNumbers
  - name: Sms
  - name: Telephony
  - name: UserDataExports
  - name: CallEvents
  - name: Events
  - name: SmsEvents
  - name: Businesses
  - name: PaymentMethods
  - name: Transactions
  - name: Usage
  - name: Wallets
paths:
  /sources/{id}/metrics:
    get:
      tags:
        - Sources
      summary: Get source lead metrics.
      description: >-
        Returns lead creation metrics for one business intake source, including
        accepted, rejected, duplicate, validation, and recent activity counts
        for monitoring.
      operationId: Sources_GetMetrics
      parameters:
        - name: id
          in: path
          description: The ID of the source to retrieve metrics for.
          required: true
          schema:
            type: string
        - name: startAt
          in: query
          description: Optional start date/time for the metric range.
          schema:
            type: string
            format: date-time
        - name: endAt
          in: query
          description: Optional end date/time for the metric range.
          schema:
            type: string
            format: date-time
        - name: days
          in: query
          description: Optional rolling day count when explicit dates are not provided.
          schema:
            pattern: ^-?(?:0|[1-9]\d*)$
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SourceMetricsResponse'
                description: >-
                  Response model containing source metrics data returned by the
                  Leadping API.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    SourceMetricsResponse:
      type: object
      properties:
        range:
          allOf:
            - $ref: '#/components/schemas/AnalyticsDateRange'
          description: Range associated with this Leadping source metrics.
        totalLeads:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: >-
            Total number of leads records represented by this Leadping source
            metrics.
          format: int32
        points:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/AnalyticsTrendPointOfint'
            description: >-
              Represents analytics trend point data exposed by Leadping
              analytics.
          description: Collection of points included with this Leadping source metrics.
        generatedAt:
          type: string
          description: Date and time when the source metrics was generated.
          format: date-time
      description: >-
        Response model containing source metrics data returned by the Leadping
        API.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          description: URI reference that identifies the problem type.
          nullable: true
        title:
          type: string
          description: Short, human-readable summary of the problem.
          nullable: true
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: HTTP status code returned for the problem.
          format: int32
          nullable: true
        detail:
          type: string
          description: >-
            Human-readable explanation specific to this occurrence of the
            problem.
          nullable: true
        instance:
          type: string
          description: >-
            URI reference that identifies this specific occurrence of the
            problem.
          nullable: true
    AnalyticsDateRange:
      type: object
      properties:
        startAt:
          type: string
          description: Date and time when this Leadping analytics date range was start.
          format: date-time
        endAt:
          type: string
          description: Date and time when this Leadping analytics date range was end.
          format: date-time
        bucketSize:
          allOf:
            - $ref: '#/components/schemas/AnalyticsBucketSize'
          description: Bucket size associated with this Leadping analytics date range.
      description: Represents analytics date range data exposed by Leadping analytics.
    AnalyticsTrendPointOfint:
      type: object
      properties:
        startAt:
          type: string
          description: Date and time when this Leadping analytics trend point was start.
          format: date-time
        endAt:
          type: string
          description: Date and time when this Leadping analytics trend point was end.
          format: date-time
        label:
          type: string
          description: Human-readable label for this Leadping analytics trend point.
        value:
          pattern: ^-?(?:0|[1-9]\d*)$
          description: Value associated with this Leadping analytics trend point.
          format: int32
      description: Represents analytics trend point data exposed by Leadping analytics.
    AnalyticsBucketSize:
      enum:
        - 3
        - 0
        - 1
        - 2
      type: integer
      description: Defines the supported analytics bucket size values.
      format: int32

````