1. Docs
  2. API Reference
  3. Get Account users summary

Get Account users summary

GET/portal/v1/accounts/{accountSlug}/users/summary

Returns dashboard-member counts for the Account — total_users, active_count, and inactive_count — computed from account_members rows. Account-scoped via the Account auth guard.

Authentication

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability administrators.viewGovernance

View administrators and their access. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.

Responses

application/json

  • dataUsersSummaryDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Returned object

Request
curl -X GET "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/users/summary" \
  -H "Authorization: Bearer $CANOPY_TOKEN"
Response
{
  "data": {
    "total_users": 0,
    "active_count": 0,
    "inactive_count": 0
  }
}
Related endpoints
GETList users in Account
GETGet a user
DELETERemove user from Account
POSTActivate a user
POSTDeactivate a user
Was this page helpful?

Tell us how we can improve this guide.