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

# Entity Stats



## OpenAPI

````yaml get /api/v2/insights/entity-stats
openapi: 3.0.0
info:
  version: 1.0.0
  title: Octave API
  description: API for Octave workspace management and AI-powered content generation
servers:
  - url: https://app.octavehq.com
security:
  - ApiKeyAuth: []
paths:
  /api/v2/insights/entity-stats:
    get:
      tags:
        - Insights
      summary: Entity Stats
      operationId: getEntityStats
      parameters:
        - schema:
            type: string
            enum:
              - persona
              - product
              - service
              - solution
              - use_case
              - playbook
              - proof_point
              - competitor
              - alternative
              - buying_trigger
              - objection
              - reference
              - hypothesis
              - segment
              - target_icp
              - motion_icp
            description: Type of entity to query stats for
          required: true
          name: entityType
          in: query
        - schema:
            type: string
            description: The oId of the entity
          required: true
          name: entityOId
          in: query
        - schema:
            type: string
            format: date-time
            description: Anchor ISO datetime for period resolution. Defaults to now.
          required: false
          name: anchorAt
          in: query
      responses:
        '200':
          description: Win rate and lift stats for a single entity across period windows
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      anchorAt:
                        type: string
                      week:
                        $ref: '#/components/schemas/EntityStats'
                      month:
                        $ref: '#/components/schemas/EntityStats'
                      quarter:
                        $ref: '#/components/schemas/EntityStats'
                    required:
                      - anchorAt
                      - week
                      - month
                      - quarter
                required:
                  - data
components:
  schemas:
    EntityStats:
      type: object
      nullable: true
      properties:
        oId:
          type: string
          description: Stats row oId
        entityType:
          type: string
          enum:
            - persona
            - product
            - service
            - solution
            - use_case
            - playbook
            - proof_point
            - competitor
            - alternative
            - buying_trigger
            - objection
            - reference
            - hypothesis
            - segment
            - target_icp
            - motion_icp
        entityOId:
          type: string
        periodType:
          type: string
          enum:
            - week
            - month
            - quarter
        periodStart:
          type: string
        periodEnd:
          type: string
        wonDealCount:
          type: integer
        lostDealCount:
          type: integer
        noDecisionDealCount:
          type: integer
        openDealCount:
          type: integer
        wonDealTotalAmount:
          type: string
        lostDealTotalAmount:
          type: string
        totalFindingCount:
          type: integer
        uniqueEventCount:
          type: integer
        uniqueCompanyCount:
          type: integer
        uniqueContactCount:
          type: integer
        winRate:
          type: number
          nullable: true
        relativeWinRate:
          type: number
          nullable: true
        liftScore:
          type: number
          nullable: true
        winRateDelta:
          type: number
          nullable: true
        isUbiquitous:
          type: boolean
        dealsWherePresent:
          type: integer
        dealsWhereAbsent:
          type: integer
        lastComputedAt:
          type: string
      required:
        - oId
        - entityType
        - entityOId
        - periodType
        - periodStart
        - periodEnd
        - wonDealCount
        - lostDealCount
        - noDecisionDealCount
        - openDealCount
        - wonDealTotalAmount
        - lostDealTotalAmount
        - totalFindingCount
        - uniqueEventCount
        - uniqueCompanyCount
        - uniqueContactCount
        - winRate
        - relativeWinRate
        - liftScore
        - winRateDelta
        - isUbiquitous
        - dealsWherePresent
        - dealsWhereAbsent
        - lastComputedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key

````