Auth API reference

Auth API · Platform-Stats

get/v1/stats/meAuth

Aggregate counts for the signed-in PlatformUser

Returns total Auth apps owned by workspaces the caller is a member of, end-users across those apps, and active API keys across those apps. Pass `workspace_id` to scope the counts to a single workspace — required from the dashboard so cross-tenant data does not bleed into the totals.

Query parameters

workspace_idstring

Limit the result to this one workspace (UUID). The caller must be a member; an id the caller does not belong to returns nothing. Omit to cover every workspace the caller belongs to.

Response · 200 Aggregate counts.

apps*number

Auth apps the caller is a member of (any role).

Example: 3

end_users*number

EndUsers across those apps.

Example: 1247

api_keys_active*number

API keys across those apps. Rows are hard-deleted on revoke so existence implies active.

Example: 8

Example

Request

GET https://api.auth.productcraft.co/v1/stats/me
Authorization: Bearer YOUR_TOKEN

Response

{
  "apps": 3,
  "end_users": 1247,
  "api_keys_active": 8
}