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

# Get tag distribution

> Returns the distribution of contacts by tags applied after calls. Pass `workspaceId` to narrow to a single workspace within the API key scope. The legacy `teamId` parameter is still accepted but adds a `Deprecation: true` response header.



## OpenAPI

````yaml https://api-public.skipcall.app/docs-json get /v1/stats/tag-repartition
openapi: 3.0.0
info:
  title: Skipcall Public API
  description: >-
    ## Overview

    The Skipcall Public API allows you to integrate Skipcall with your
    applications, CRM, or automation tools.


    ## Plan Requirements

    API access is available for **STARTER**, **INTERMÉDIAIRE** and **EXPERT**
    plans.


    ## Authentication

    All API requests require authentication using an API Key. Include your API
    key in the `Authorization` header:


    ```

    Authorization: Bearer sk_live_your_api_key_here

    ```


    You can generate API keys from your Skipcall dashboard under Settings > API
    Keys.


    ## Rate Limiting

    Rate limits vary by subscription plan:


    | Plan | Rate Limit |

    |------|------------|

    | STARTER | 100 requests/minute |

    | INTERMÉDIAIRE | 100 requests/minute |

    | EXPERT | 1000 requests/minute |


    Rate limit headers are included in every response:

    - `X-RateLimit-Limit`: Maximum requests per minute for your plan

    - `X-RateLimit-Remaining`: Remaining requests in the current window

    - `X-RateLimit-Reset`: Unix timestamp when the rate limit resets


    ## Errors

    The API uses standard HTTP status codes:

    - `200` - Success

    - `400` - Bad Request (invalid parameters)

    - `401` - Unauthorized (invalid or missing API key)

    - `403` - Forbidden (subscription required or plan not eligible)

    - `404` - Not Found

    - `429` - Too Many Requests (rate limit exceeded)

    - `500` - Internal Server Error


    ### Subscription Errors

    | Code | Description |

    |------|-------------|

    | `SUBSCRIPTION_REQUIRED` | An active subscription is required to access the
    API |

    | `PLAN_NOT_ELIGIBLE` | API access requires STARTER, INTERMÉDIAIRE or EXPERT
    plan |
  version: '1.0'
  contact: {}
servers:
  - url: https://api-public.skipcall.app
    description: Production
security: []
tags:
  - name: Contacts
    description: Manage your contacts
  - name: Calls
    description: Access call history and recordings
paths:
  /v1/stats/tag-repartition:
    get:
      tags:
        - Statistics
      summary: Get tag distribution
      description: >-
        Returns the distribution of contacts by tags applied after calls. Pass
        `workspaceId` to narrow to a single workspace within the API key scope.
        The legacy `teamId` parameter is still accepted but adds a `Deprecation:
        true` response header.
      operationId: StatsController_getTagRepartition
      parameters:
        - name: sequenceId
          required: false
          in: query
          description: Filter by sequence ID
          schema:
            type: string
        - name: userMembershipId
          required: false
          in: query
          description: Filter by user membership ID
          schema:
            type: string
        - name: callType
          required: false
          in: query
          description: Filter by call type. "all" includes sequence + direct calls.
          schema:
            default: all
            type: string
            enum:
              - all
              - sequence
              - direct
              - inbound
              - outbound
        - name: granularity
          required: false
          in: query
          description: Time granularity for grouping results
          schema:
            default: none
            type: string
            enum:
              - hour
              - day
              - week
              - month
              - none
        - name: startDate
          required: false
          in: query
          description: Start date (ISO format)
          schema:
            type: string
        - name: endDate
          required: false
          in: query
          description: End date (ISO format)
          schema:
            type: string
        - name: workspaceId
          required: false
          in: query
          description: >-
            Filter stats by a single workspace ID (must be within the API key
            scope). Stats endpoints accept exactly one workspace, unlike list
            endpoints which support a comma-separated `workspaceIds` filter.
            Replaces the deprecated `teamId`.
          schema:
            type: string
        - name: teamId
          required: false
          in: query
          deprecated: true
          description: >-
            **Deprecated** — use `workspaceId` instead. When set, the response
            includes a `Deprecation: true` header.
          schema:
            type: string
      responses:
        '200':
          description: Tag distribution statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagRepartitionResponseDto'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: Invalid or revoked API key
                      status:
                        type: number
                        example: 401
        '403':
          description: Requested workspaceId/teamId is outside the API key scope
      security:
        - ApiKey: []
components:
  schemas:
    TagRepartitionResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TagRepartitionItemDto'
      required:
        - data
    TagRepartitionItemDto:
      type: object
      properties:
        tagId:
          type: string
          description: Tag ID
        label:
          type: string
          description: Tag label
        count:
          type: number
          description: Number of contacts with this tag
        isSuccess:
          type: boolean
          description: Whether this tag indicates success
        date:
          type: string
          description: Date bucket (when granularity is not "none")
          example: '2023-10-01T00:00:00.000Z'
      required:
        - tagId
        - label
        - count
        - isSuccess
  securitySchemes:
    ApiKey:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: Enter your API Key (sk_live_xxx or sk_test_xxx)

````