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

# Describe stats

> Describe available stats schema. Without resource returns root nodes and metrics. With resource returns node columns, associations, and available metrics.

Required permissions:
 - `stats:read`



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/whopsdk/openapi.documented.yml get /stats/describe
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    The Whop REST API. Please see
    https://docs.whop.com/developer/api/getting-started for more details.
  termsOfService: https://whop.com/tos-developer-api/
  version: 1.0.0
servers:
  - url: https://api.whop.com/api/v1
    description: Production Whop API
security: []
tags:
  - name: Products
    description: Products
  - name: Plans
    description: Plans
  - name: Payments
    description: Payments
  - name: Refunds
    description: Refunds
  - name: Disputes
    description: Disputes
  - name: Dispute alerts
    description: Dispute alerts
  - name: Resolution center cases
    description: Resolution center cases
  - name: Checkout configurations
    description: Checkout configurations
  - name: Setup intents
    description: Setup intents
  - name: Payment methods
    description: Payment methods
  - name: Invoices
    description: Invoices
  - name: Promo codes
    description: Promo codes
  - name: Card transactions
    description: Card transactions
  - name: Ledger accounts
    description: Ledger accounts
  - name: Transfers
    description: Transfers
  - name: Withdrawals
    description: Withdrawals
  - name: Payout methods
    description: Payout methods
  - name: Verifications
    description: Verifications
  - name: Payout accounts
    description: Payout accounts
  - name: Topups
    description: Topups
  - name: Users
    description: Users
  - name: Companies
    description: Companies
  - name: Authorized users
    description: Authorized users
  - name: Fee markups
    description: Fee markups
  - name: Members
    description: Members
  - name: Memberships
    description: Memberships
  - name: Leads
    description: Leads
  - name: Entries
    description: Entries
  - name: Shipments
    description: Shipments
  - name: Reviews
    description: Reviews
  - name: Company token transactions
    description: Company token transactions
  - name: Affiliates
    description: Affiliates
  - name: Experiences
    description: Experiences
  - name: Forums
    description: Forums
  - name: Forum posts
    description: Forum posts
  - name: Chat channels
    description: Chat channels
  - name: Support channels
    description: Support channels
  - name: Messages
    description: Messages
  - name: Reactions
    description: Reactions
  - name: Dm members
    description: Dm members
  - name: Dm channels
    description: Dm channels
  - name: Notifications
    description: Notifications
  - name: Courses
    description: Courses
  - name: Course chapters
    description: Course chapters
  - name: Course lessons
    description: Course lessons
  - name: Course students
    description: Course students
  - name: Course lesson interactions
    description: Course lesson interactions
  - name: Apps
    description: Apps
  - name: Webhooks
    description: Webhooks
  - name: App builds
    description: App builds
  - name: Access tokens
    description: Access tokens
  - name: Account links
    description: Account links
  - name: Files
    description: Files
  - name: Ai chats
    description: Ai chats
  - name: Bounties
    description: Bounties
  - name: Stats
    description: Stats
  - name: Ad campaigns
    description: Ad campaigns
  - name: Ad groups
    description: Ad groups
  - name: Ads
    description: Ads
  - name: Conversions
    description: Conversions
paths:
  /stats/describe:
    get:
      tags:
        - Stats
      summary: Describe stats
      description: >-
        Describe available stats schema. Without resource returns root nodes and
        metrics. With resource returns node columns, associations, and available
        metrics.


        Required permissions:
         - `stats:read`
      operationId: describeStats
      parameters:
        - name: resource
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Resource path using : as separator (e.g., 'receipts',
              'payments:membership', 'receipts:gross_revenue').
          explode: true
          style: form
        - name: company_id
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Scope query to a specific company.
            example: biz_xxxxxxxxxxxxxx
          explode: true
          style: form
        - name: user_id
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Scope query to a specific user.
            example: user_xxxxxxxxxxxxx
          explode: true
          style: form
      responses:
        '200':
          description: A successful response
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - type:
                      - object
                      - 'null'
                    properties:
                      typename:
                        type: string
                        const: DescribeRoot
                        description: The typename of this object
                      nodes:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Available root nodes.
                      views:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Available API resource views.
                      metrics:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The metric name.
                            node_path:
                              type: string
                              description: The node path this metric operates on.
                            supported_engines:
                              type: array
                              items:
                                type: string
                                description: >-
                                  Represents textual data as UTF-8 character
                                  sequences. This type is most often used by
                                  GraphQL to represent free-form human-readable
                                  text.
                              description: Query engines that support this metric.
                          required:
                            - name
                            - node_path
                            - supported_engines
                          description: A metric available for querying.
                        description: Available metrics.
                      debug:
                        type:
                          - object
                          - 'null'
                        properties:
                          request_id:
                            type:
                              - string
                              - 'null'
                            description: Unique request identifier for debugging.
                        required:
                          - request_id
                        description: Debug information.
                    required:
                      - typename
                      - nodes
                      - views
                      - metrics
                      - debug
                    description: >-
                      Root schema description showing available nodes, views,
                      and metrics.
                    title: DescribeRoot
                  - type:
                      - object
                      - 'null'
                    properties:
                      typename:
                        type: string
                        const: DescribeNode
                        description: The typename of this object
                      node:
                        type: string
                        description: The node path being described.
                      engine:
                        type: string
                        description: The query engine being used.
                      columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Available columns.
                      sortable_columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Columns that can be used for sorting.
                      associations:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The association name.
                            type:
                              type: string
                              description: >-
                                The type (belongs_to, has_many, has_one, event,
                                namespace).
                            model:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The associated model class name (for model
                                associations).
                            path:
                              type:
                                - string
                                - 'null'
                              description: The full path (for event associations).
                            event_name:
                              type:
                                - string
                                - 'null'
                              description: The event name (for event type).
                          required:
                            - name
                            - type
                            - model
                            - path
                            - event_name
                          description: >-
                            An association or child path available for
                            navigation.
                        description: Available associations or child paths.
                      metrics:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The metric name.
                            node_path:
                              type: string
                              description: The node path this metric operates on.
                            supported_engines:
                              type: array
                              items:
                                type: string
                                description: >-
                                  Represents textual data as UTF-8 character
                                  sequences. This type is most often used by
                                  GraphQL to represent free-form human-readable
                                  text.
                              description: Query engines that support this metric.
                          required:
                            - name
                            - node_path
                            - supported_engines
                          description: A metric available for querying.
                        description: Available metrics for this node.
                      sample:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          additionalProperties: true
                          description: Represents untyped JSON
                        description: Sample data rows.
                      debug:
                        type:
                          - object
                          - 'null'
                        properties:
                          request_id:
                            type:
                              - string
                              - 'null'
                            description: Unique request identifier for debugging.
                        required:
                          - request_id
                        description: Debug information.
                    required:
                      - typename
                      - node
                      - engine
                      - columns
                      - sortable_columns
                      - associations
                      - metrics
                      - sample
                      - debug
                    description: >-
                      Description of a node (model) including its columns and
                      associations.
                    title: DescribeNode
                  - type:
                      - object
                      - 'null'
                    properties:
                      typename:
                        type: string
                        const: DescribeMetric
                        description: The typename of this object
                      metric:
                        type: string
                        description: The metric name.
                      node:
                        type: string
                        description: The node path this metric operates on.
                      engine:
                        type: string
                        description: The query engine being used.
                      timestamp_column:
                        type: string
                        description: The timestamp column used for time filtering.
                      supported_engines:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Query engines that support this metric.
                      filterable_columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Columns that can be used for filtering.
                      breakdownable_columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Columns that can be used for breakdowns.
                      sql:
                        type:
                          - string
                          - 'null'
                        description: The generated SQL query.
                      debug:
                        type:
                          - object
                          - 'null'
                        properties:
                          request_id:
                            type:
                              - string
                              - 'null'
                            description: Unique request identifier for debugging.
                        required:
                          - request_id
                        description: Debug information.
                    required:
                      - typename
                      - metric
                      - node
                      - engine
                      - timestamp_column
                      - supported_engines
                      - filterable_columns
                      - breakdownable_columns
                      - sql
                      - debug
                    description: >-
                      Description of a metric including its configuration and
                      SQL.
                    title: DescribeMetric
                  - type:
                      - object
                      - 'null'
                    properties:
                      typename:
                        type: string
                        const: DescribeView
                        description: The typename of this object
                      view:
                        type: string
                        description: The view name being described.
                      resource:
                        type: string
                        description: The API resource name.
                      model:
                        type: string
                        description: The underlying model class.
                      engine:
                        type: string
                        description: The query engine being used.
                      columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Available columns.
                      sortable_columns:
                        type: array
                        items:
                          type: string
                          description: >-
                            Represents textual data as UTF-8 character
                            sequences. This type is most often used by GraphQL
                            to represent free-form human-readable text.
                        description: Columns that can be used for sorting.
                      associations:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The association name.
                            type:
                              type: string
                              description: >-
                                The type (belongs_to, has_many, has_one, event,
                                namespace).
                            model:
                              type:
                                - string
                                - 'null'
                              description: >-
                                The associated model class name (for model
                                associations).
                            path:
                              type:
                                - string
                                - 'null'
                              description: The full path (for event associations).
                            event_name:
                              type:
                                - string
                                - 'null'
                              description: The event name (for event type).
                          required:
                            - name
                            - type
                            - model
                            - path
                            - event_name
                          description: >-
                            An association or child path available for
                            navigation.
                        description: Available associations.
                      metrics:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: The metric name.
                            node_path:
                              type: string
                              description: The node path this metric operates on.
                            supported_engines:
                              type: array
                              items:
                                type: string
                                description: >-
                                  Represents textual data as UTF-8 character
                                  sequences. This type is most often used by
                                  GraphQL to represent free-form human-readable
                                  text.
                              description: Query engines that support this metric.
                          required:
                            - name
                            - node_path
                            - supported_engines
                          description: A metric available for querying.
                        description: Available metrics.
                      sample:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          additionalProperties: true
                          description: Represents untyped JSON
                        description: Sample data rows.
                      debug:
                        type:
                          - object
                          - 'null'
                        properties:
                          request_id:
                            type:
                              - string
                              - 'null'
                            description: Unique request identifier for debugging.
                        required:
                          - request_id
                        description: Debug information.
                    required:
                      - typename
                      - view
                      - resource
                      - model
                      - engine
                      - columns
                      - sortable_columns
                      - associations
                      - metrics
                      - sample
                      - debug
                    description: >-
                      Description of an API resource view including its columns
                      and associations.
                    title: DescribeView
                discriminator:
                  propertyName: typename
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: invalid_request_error
                  code: parameter_missing
                  message: 'Missing required parameter: amount.'
                  param: amount
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: unauthorized
                  message: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: forbidden
                  message: You do not have permission to access this resource
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: not_found
                  message: Resource not found
        '422':
          description: Verification required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error: null
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: internal_server_error
                  message: An unexpected error occurred
      security:
        - bearerAuth:
            - stats:read
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Whop from '@whop/sdk';

            const client = new Whop({
              apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.stats.describe();

            console.log(response);
        - lang: Python
          source: |-
            import os
            from whop_sdk import Whop

            client = Whop(
                api_key=os.environ.get("WHOP_API_KEY"),  # This is the default and can be omitted
            )
            response = client.stats.describe()
            print(response)
        - lang: Ruby
          source: |-
            require "whop_sdk"

            whop = WhopSDK::Client.new(api_key: "My API Key")

            response = whop.stats.describe

            puts(response)
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        A company API key, company scoped JWT, app API key, or user OAuth token.
        You must prepend your key/token with the word 'Bearer', which will look
        like `Bearer ***************************`
      scheme: bearer
      bearerFormat: auth-scheme

````