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

# Get Stats



## OpenAPI

````yaml GET /stats
openapi: 3.1.0
info:
  title: Tabillo API
  version: 1.0.0
  description: >
    External REST API for Tabillo workspaces. Authenticate using an API key
    generated in Settings → API Keys (admin only).
  contact:
    email: support@tabillo.com
servers:
  - url: https://crossproductroadmapbackend.vercel.app/api/v1
    description: Production
security:
  - ApiKeyAuth: []
  - OAuthBearer: []
paths:
  /stats:
    get:
      tags:
        - Stats
      summary: Get initiative counts by status and product
      operationId: getStats
      parameters:
        - $ref: '#/components/parameters/TenantSlug'
        - name: quarter
          in: query
          schema:
            type: string
          description: Filter to a specific quarter key (e.g. `2026_Q1`)
        - name: productId
          in: query
          schema:
            type: string
        - name: subProductId
          in: query
          schema:
            type: string
        - name: statusId
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                  byStatus:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        color:
                          type: string
                        count:
                          type: integer
                        percentage:
                          type: integer
                  byProduct:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        count:
                          type: integer
                        subProducts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              count:
                                type: integer
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    TenantSlug:
      name: x-tenant-slug
      in: header
      required: true
      schema:
        type: string
      description: Your workspace slug (e.g. `acme`).
      example: acme
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: tab_<32 alphanumeric chars>
      description: >
        Generate an API key in your workspace Settings → API Keys. Pass it as
        `Authorization: Bearer tab_<key>` on every request.
    OAuthBearer:
      type: http
      scheme: bearer
      bearerFormat: tabt_<32 alphanumeric chars>
      description: >
        OAuth 2.0 access token obtained via the Authorization Code flow. Pass it
        as `Authorization: Bearer tabt_<token>` on every request. Tokens expire
        after 1 hour; use the refresh token to obtain a new one.

````