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

# Get directory user statistics



## OpenAPI

````yaml https://api.wirespeed.co/v1/openapi.json get /v1/directory/stats
openapi: 3.0.0
info:
  title: Wirespeed API
  description: The public Wirespeed API. v1 is the first stable contract.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.wirespeed.co
security: []
tags: []
paths:
  /v1/directory/stats:
    get:
      tags:
        - Directory
      summary: Get directory user statistics
      operationId: DirectoryController_getStats
      parameters:
        - name: startDate
          required: false
          in: query
          description: Start date (inclusive, ISO8601 string)
          schema:
            type: string
        - name: endDate
          required: false
          in: query
          description: End date (inclusive, ISO8601 string)
          schema:
            type: string
        - name: teamId
          required: false
          in: query
          description: >-
            Service-provider only: narrow stats to this tenant id (must be in
            the caller's allowed team list). When omitted, stats include all
            teams in scope (same as directory search without teamId).
          schema:
            type: string
        - name: dedupeCanonicalRoots
          required: false
          in: query
          description: >-
            When true and asset deduplication is enabled for the team, stats
            count only canonical representative rows (canonical_id IS NULL)
          schema:
            type: boolean
        - name: onlyCanonicalClustersWithDuplicates
          required: false
          in: query
          description: >-
            When true together with dedupeCanonicalRoots and asset
            deduplication, stats include only canonical roots that have at least
            one merged duplicate from another source
          schema:
            type: boolean
      responses:
        '200':
          description: User statistics including counts by type, status, and source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DirectoryUserStats'
      security:
        - bearer: []
components:
  schemas:
    DirectoryUserStats:
      type: object
      properties:
        totalCount:
          type: number
          description: Total number of managed users
        containedCount:
          type: number
          description: Number of contained users
        enabledCount:
          type: number
          description: Number of enabled users
        disabledCount:
          type: number
          description: Number of disabled users
        smsEnrollmentEnrolledCount:
          type: number
          description: Managed users enrolled in SMS (consent received)
        smsEnrollmentPendingCount:
          type: number
          description: Managed users with a pending SMS invite (1-2 attempts)
        smsEnrollmentMaxAttemptsCount:
          type: number
          description: Managed users who reached the SMS invite attempt limit
        smsEnrollmentOptedOutCount:
          type: number
          description: Managed users who opted out of SMS enrollment
        smsEnrollmentNotInvitedCount:
          type: number
          description: Managed users who have not been sent an SMS invite
        userTypes:
          description: >-
            User counts by group. Groups are non-exclusive; a user can appear in
            multiple types. "Other" counts users with none of the tracked
            groups.
          type: array
          items:
            $ref: '#/components/schemas/DirectoryUserTypeCount'
        userGroups:
          description: >-
            Top groups by user count (up to 4), plus an "Other" catch-all for
            the remainder. Grouped by actual group ID so custom groups appear
            alongside system groups.
          type: array
          items:
            $ref: '#/components/schemas/DirectoryUserGroupCount'
        integrations:
          description: User counts by integration source
          type: array
          items:
            $ref: '#/components/schemas/DirectoryUserIntegrationCount'
      required:
        - totalCount
        - containedCount
        - enabledCount
        - disabledCount
        - smsEnrollmentEnrolledCount
        - smsEnrollmentPendingCount
        - smsEnrollmentMaxAttemptsCount
        - smsEnrollmentOptedOutCount
        - smsEnrollmentNotInvitedCount
        - userTypes
        - userGroups
        - integrations
    DirectoryUserTypeCount:
      type: object
      properties:
        type:
          type: string
          description: User type group
          enum:
            - VIP
            - ADMIN
            - EXTERNAL
            - TECHNICAL
            - FINANCIAL
            - NHI
            - Other
        count:
          type: number
          description: Count of users with this type
      required:
        - type
        - count
    DirectoryUserGroupCount:
      type: object
      properties:
        groupId:
          type: string
          description: Group ID (null for the "Other" catch-all)
          nullable: true
        name:
          type: string
          description: Group display name
        color:
          type: string
          description: Group color
          nullable: true
          enum:
            - gray
            - red
            - orange
            - amber
            - green
            - teal
            - blue
            - indigo
            - purple
            - pink
        count:
          type: number
          description: Count of users in this group
      required:
        - groupId
        - name
        - color
        - count
    DirectoryUserIntegrationCount:
      type: object
      properties:
        integrationId:
          type: string
          description: Integration ID
        platform:
          type: string
          enum:
            - aws
            - axonius
            - bitwarden
            - box
            - checkpoint-firewall
            - checkpoint-harmony
            - cisco-catalyst
            - cisco-duo
            - cisco-meraki
            - cisco-secure-access
            - cisco-umbrella
            - cisco-xdr
            - connectwise-psa
            - crowdstrike-falcon
            - cyberark
            - darktrace
            - email
            - exium
            - fleet-dm
            - fortianalyzer
            - fortinet
            - generic-json
            - generic-syslog
            - google-alert-center
            - google-chronicle
            - google-directory
            - google-security-center
            - halcyon
            - halo-itsm
            - have-i-been-pwned
            - horizon3
            - hyas-protect
            - ipinfo
            - jamf-pro
            - jamf-protect
            - jira-cloud
            - jira-data-center
            - jumpcloud
            - kandji
            - manage-engine-ad-audit-plus
            - microsoft
            - microsoft-entra
            - microsoft-teams
            - microsoft-teams-v2
            - mimecast
            - ninjaone
            - odoo-helpdesk
            - okta
            - one-password
            - onelogin
            - orca-security
            - pager-duty
            - palo-alto-networks-cortex
            - picus
            - ping-one
            - reversing-labs
            - safebreach
            - sandfly
            - sentinel-one
            - service-now
            - slack
            - sms
            - smtp
            - sonic-wall
            - sophos
            - splunk
            - stairwell
            - tenable-nessus
            - thinkst-canary
            - unifi
            - vectra
            - watchguard-firebox
            - windows-event-logs
            - wirespeed
            - wiz
            - wordfence
            - zscaler-zpa
          description: Integration platform
        count:
          type: number
          description: Count of users from this integration
      required:
        - integrationId
        - platform
        - count
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````