accounts

Summary

Aggregate counts over the SAME compiled row filter GET /accounts uses, so a tenant admin's summary counts only their tenant and a user's counts only themselves — never a number the list endpoint would refuse to show as rows. group_by buckets into a closed, documented dimension set (an unknown group_by is a 400, not a silent no-op); interval instead (or alongside) produces a time-bucketed data.series over the same since/until window GET /accounts filters on. Service accounts are excluded by default like GET /accounts; kind=service|all needs tenant admin.

get/accounts/summary

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/accounts/summary
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Query parameters

group_by'role' | 'active' | 'email_verified' | 'profile_complete' | 'verification_status' | 'has_wallet' | 'invited' | 'tenant' | 'verified_provider' | 'group'

bucket dimension; every bucket has a matching GET /accounts filter

sincestring date-time

RFC3339 lower bound on created_at (inclusive)

untilstring date-time

RFC3339 upper bound on created_at (exclusive)

interval'hour' | 'day' | 'week' | 'month'

returns data.series bucketed at this interval

tzstring

IANA time zone for bucketing (default UTC)

qstring

free-text search

emailstring

exact email match

activeboolean

filter by active flag

email_verifiedboolean

true = verified emails only, false = unverified only; absent = no filter

profile_incompleteboolean

true = the PERSON (canonical name record) is missing a first or last name, false = complete profiles only; absent = no filter. Same predicate as the summary profile_complete tile and gRPC ListProfileIncomplete; service accounts are never incomplete

profile_completedboolean

admin-set provisioner flag (PATCH /accounts/:id/profile-completed): true = marked complete, false = awaiting review; absent = no filter. NOT the same as profile_incomplete, which derives from name data

verified_providerstring

accounts with a verified session from this provider (e.g. persona)

verification_status'verified' | 'pending' | 'failed' | 'none'

KYC rollup bucket

role'admin' | 'tenant_admin' | 'developer' | 'user'

role slug

has_walletboolean

true = has at least one wallet, false = none

has_phoneboolean

true = a phone on the linked person, false = none

invitedboolean

true = invited by anyone, false = organic signup

invited_bystring uuid

only accounts invited by this account id

invited_by_meboolean

only accounts I invited

group_idstring uuid

only members of this group; 404 group_not_found if the group is not visible to you

exclude_group_idstring uuid

drop members of this group; 404 group_not_found if the group is not visible to you

last_active_sincestring date-time

last active at or after this instant (RFC3339)

tenant_idstring uuid

list this tenant instead of your own (default: the caller's own tenant, platform admins included). Another tenant requires the cross_tenant grant — 403 otherwise

all_tenantsboolean

list EVERY tenant (platform-wide admin view). Requires the cross_tenant grant — 403 otherwise. Mutually exclusive with tenant_id (400 conflicting_tenant_scope)

kind'human' | 'service' | 'all'

account kind: human (default, excludes service accounts), service, or all. service|all require tenant admin (403 otherwise)

Response

OK

successboolean

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.