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

# Funnel stage distribution

> How many companies sit in each funnel stage (with active counts and conversion rates).



## OpenAPI

````yaml https://app.stairoids.com/api/docs/public post /public/v1/funnel/distribution
openapi: 3.0.1
info:
  title: Stairoids API
  description: The Next Generation API
  version: '1.0'
servers:
  - url: http://app.stairoids.com/api
    description: Generated server url
security:
  - ApiKeyAuth: []
tags:
  - name: Public API - Funnel
    description: Funnel stages, distribution, and pipeline trend metrics.
  - name: Public API - Attribution
    description: Traffic sources, campaigns, and the accounts they drove.
  - name: Public API - Lead Scores
    description: Signal details and per-person scores.
  - name: Public API - Reference
    description: Your ICPs, personas, labels, account lists, and signal categories.
  - name: Public API - Activity
    description: Per-person and general (cross-company) signal feeds.
  - name: Public API - LinkedIn Ads
    description: LinkedIn ad campaigns, posts, likes, and company engagement.
  - name: Public API - Companies
    description: Search, look up, and read activity for scored companies.
  - name: Public API - Opportunities
    description: Your best outreach opportunities right now.
paths:
  /public/v1/funnel/distribution:
    post:
      tags:
        - Public API - Funnel
      summary: Funnel stage distribution
      description: >-
        How many companies sit in each funnel stage (with active counts and
        conversion rates).
      operationId: getPublicFunnelDistribution
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicFunnelFilterRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicFunnelDistributionDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomError'
        '402':
          description: Payment Required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PlanLimitError'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AgencyLimitError'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomError'
components:
  schemas:
    PublicFunnelFilterRequest:
      type: object
      properties:
        startDate:
          type: integer
          description: >-
            Window start, epoch millis. Omit both startDate and endDate for the
            default recent window.
          format: int64
          example: 1717200000000
        endDate:
          type: integer
          description: Window end, epoch millis.
          format: int64
          example: 1719792000000
        icpIds:
          type: array
          description: Restrict to these ICP ids. Null or empty = all ICPs.
          items:
            type: integer
            description: Restrict to these ICP ids. Null or empty = all ICPs.
            format: int64
        accountListIds:
          type: array
          description: Restrict to these account-list ids. Null or empty = all lists.
          items:
            type: integer
            description: Restrict to these account-list ids. Null or empty = all lists.
            format: int64
      description: Time-window and segment filter for analytics endpoints.
    PublicFunnelDistributionDTO:
      type: object
      properties:
        stages:
          type: array
          description: Per-stage counts.
          items:
            $ref: '#/components/schemas/PublicFunnelStageCountDTO'
        totalCount:
          type: integer
          description: Total companies across all stages.
          format: int32
          example: 640
        totalActiveCount:
          type: integer
          description: Total companies with recent activity across all stages.
          format: int32
          example: 210
      description: Distribution of companies across funnel stages.
    CustomError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
    PlanLimitError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
        category:
          type: string
        currentUsage:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
        addOnSlug:
          type: string
        planSlug:
          type: string
        addOnPriceMonthly:
          type: integer
          format: int32
        upgradePlanSlug:
          type: string
        upgradePlanName:
          type: string
        upgradePlanPriceMonthly:
          type: integer
          format: int32
    AgencyLimitError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
        category:
          type: string
        currentUsage:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
    PublicFunnelStageCountDTO:
      type: object
      properties:
        stageId:
          type: integer
          description: Stage id.
          format: int64
          example: 12
        stageName:
          type: string
          description: Stage name.
          example: Hot
        minScore:
          type: integer
          description: Minimum score for this stage.
          format: int64
          example: 500
        count:
          type: integer
          description: Total companies in this stage.
          format: int32
          example: 84
        activeCount:
          type: integer
          description: Companies in this stage with recent activity.
          format: int32
          example: 37
        percentage:
          type: number
          description: Share of all companies in this stage (0-100).
          format: double
          example: 12.5
        conversionRate:
          type: number
          description: Conversion rate into this stage, if computed.
          format: double
          nullable: true
          example: 0.42
      description: Company counts for a single funnel stage.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your organization's public API key. Manage it at GET
        /api/user/public-api-key.
      name: X-Api-Key
      in: header

````