Skip to main content
GET
/
v1
/
directory
/
stats
Get directory user statistics
curl --request GET \
  --url https://api.wirespeed.co/v1/directory/stats \
  --header 'Authorization: Bearer <token>'
{
  "totalCount": 123,
  "containedCount": 123,
  "enabledCount": 123,
  "disabledCount": 123,
  "smsEnrollmentEnrolledCount": 123,
  "smsEnrollmentPendingCount": 123,
  "smsEnrollmentMaxAttemptsCount": 123,
  "smsEnrollmentOptedOutCount": 123,
  "smsEnrollmentNotInvitedCount": 123,
  "userTypes": [
    {
      "count": 123
    }
  ],
  "userGroups": [
    {
      "groupId": "<string>",
      "name": "<string>",
      "count": 123
    }
  ],
  "integrations": [
    {
      "integrationId": "<string>",
      "count": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

startDate
string

Start date (inclusive, ISO8601 string)

endDate
string

End date (inclusive, ISO8601 string)

teamId
string

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).

dedupeCanonicalRoots
boolean

When true and asset deduplication is enabled for the team, stats count only canonical representative rows (canonical_id IS NULL)

onlyCanonicalClustersWithDuplicates
boolean

When true together with dedupeCanonicalRoots and asset deduplication, stats include only canonical roots that have at least one merged duplicate from another source

Response

200 - application/json

User statistics including counts by type, status, and source

totalCount
number
required

Total number of managed users

containedCount
number
required

Number of contained users

enabledCount
number
required

Number of enabled users

disabledCount
number
required

Number of disabled users

smsEnrollmentEnrolledCount
number
required

Managed users enrolled in SMS (consent received)

smsEnrollmentPendingCount
number
required

Managed users with a pending SMS invite (1-2 attempts)

smsEnrollmentMaxAttemptsCount
number
required

Managed users who reached the SMS invite attempt limit

smsEnrollmentOptedOutCount
number
required

Managed users who opted out of SMS enrollment

smsEnrollmentNotInvitedCount
number
required

Managed users who have not been sent an SMS invite

userTypes
object[]
required

User counts by group. Groups are non-exclusive; a user can appear in multiple types. "Other" counts users with none of the tracked groups.

userGroups
object[]
required

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.

integrations
object[]
required

User counts by integration source