Auth0 Stats API
The stats API from Auth0 — 2 operation(s) for stats.
Operations 2
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
The stats API from Auth0 — 2 operation(s) for stats.
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/auth0:auth0-stats-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Auth0 Management Stats API
description: Auth0 Management API v2.
termsOfService: https://auth0.com/web-terms/
contact:
name: Auth0 Support
url: https://support.auth0.com
version: '2.0'
servers:
- url: https://{tenantDomain}/api/v2
variables:
tenantDomain:
default: '{TENANT}.auth0.com'
description: Auth0 Tenant Domain
security:
- bearerAuth: []
tags:
- name: Stats
paths:
/stats/active-users:
get:
summary: Get active users count
description: Retrieve the number of active users that logged in during the last 30 days.
tags:
- Stats
responses:
'200':
description: Number of active users successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/GetActiveUsersCountStatsResponseContent'
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: 'Insufficient scope; expected any of: read:stats.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_active-users
x-release-lifecycle: GA
x-operation-name: getActiveUsersCount
x-operation-group: stats
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:stats
x-codeSamples:
- lang: csharp
label: Get active users count
source: "using Auth0.ManagementApi;\nusing System.Threading.Tasks;\n\npublic partial class Examples\n{\n public async Task Example() {\n var client = new ManagementApiClient(\n token: \"<token>\",\n clientOptions: new ClientOptions { BaseUrl = \"https://{YOUR_DOMAIN}/api/v2\" }\n );\n\n await client.Stats.GetActiveUsersCountAsync();\n }\n\n}\n"
- lang: go
label: Get active users count
source: "package example\n\nimport (\n context \"context\"\n\n client \"github.com/auth0/go-auth0/v3/management/client\"\n option \"github.com/auth0/go-auth0/v3/management/option\"\n)\n\nfunc do() {\n mgmt, err := client.New(\n \"{YOUR_DOMAIN}\",\n option.WithToken(\n \"<token>\",\n ),\n )\n if err != nil {\n return\n }\n mgmt.Stats.GetActiveUsersCount(\n context.TODO(),\n )\n}\n"
- lang: java
label: Get active users count
source: "package com.example.usage;\n\nimport com.auth0.client.mgmt.ManagementApi;\n\npublic class Example {\n public static void main(String[] args) {\n ManagementApi client = ManagementApi\n .builder()\n .domain(\"{YOUR_DOMAIN}\")\n .token(\"<token>\")\n .build();\n\n client.stats().getActiveUsersCount();\n }\n}"
- lang: php
label: Get active users count
source: "<?php\n\nnamespace Example;\n\nuse Auth0\\SDK\\API\\Management\\Wrapper\\ManagementClient;\nuse Auth0\\SDK\\API\\Management\\Wrapper\\ManagementClientOptions;\n\n$client = new ManagementClient(new ManagementClientOptions(\n domain: '{YOUR_DOMAIN}',\n token: '<token>',\n));\n$client->stats->getActiveUsersCount();\n"
- lang: python
label: Get active users count
source: "from auth0.management import ManagementClient\n\nclient = ManagementClient(\n domain=\"{YOUR_DOMAIN}\",\n token=\"<token>\",\n)\n\nclient.stats.get_active_users_count()\n"
- lang: ruby
label: Get active users count
source: 'require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.stats.get_active_users_count
'
- lang: typescript
label: Get active users count
source: "import { ManagementClient } from \"auth0\";\n\nasync function main() {\n const client = new ManagementClient({\n domain: \"{YOUR_DOMAIN}\",\n token: \"<token>\",\n });\n await client.stats.getActiveUsersCount();\n}\nmain();\n"
- lang: javascript
label: Get active users count
source: "import { ManagementClient } from \"auth0\";\n\nasync function main() {\n const client = new ManagementClient({\n domain: \"{YOUR_DOMAIN}\",\n token: \"<token>\",\n });\n await client.stats.getActiveUsersCount();\n}\nmain();\n"
/stats/daily:
get:
summary: Get daily stats
description: Retrieve the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range.
tags:
- Stats
parameters:
- name: from
in: query
description: Optional first day of the date range (inclusive) in YYYYMMDD format.
schema:
type: string
- name: to
in: query
description: Optional last day of the date range (inclusive) in YYYYMMDD format.
schema:
type: string
responses:
'200':
description: Daily stats successfully retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DailyStats'
'400':
$ref: '#/components/responses/GetStatsDailyBadRequest'
'401':
$ref: '#/components/responses/GetStatsDailyUnauthorized'
'403':
$ref: '#/components/responses/GetStatsDailyForbidden'
'429':
$ref: '#/components/responses/GetStatsDailyTooManyRequests'
operationId: get_daily
x-release-lifecycle: GA
x-operation-name: getDaily
x-operation-request-parameters-name: GetDailyStatsRequestParameters
x-operation-group: stats
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:stats
x-codeSamples:
- lang: csharp
label: Get daily stats
source: "using Auth0.ManagementApi;\nusing System.Threading.Tasks;\n\npublic partial class Examples\n{\n public async Task Example() {\n var client = new ManagementApiClient(\n token: \"<token>\",\n clientOptions: new ClientOptions { BaseUrl = \"https://{YOUR_DOMAIN}/api/v2\" }\n );\n\n await client.Stats.GetDailyAsync(\n new GetDailyStatsRequestParameters {\n From = \"from\",\n To = \"to\"\n }\n );\n }\n\n}\n"
- lang: go
label: Get daily stats
source: "package example\n\nimport (\n context \"context\"\n\n management \"github.com/auth0/go-auth0/v3/management\"\n client \"github.com/auth0/go-auth0/v3/management/client\"\n option \"github.com/auth0/go-auth0/v3/management/option\"\n)\n\nfunc do() {\n mgmt, err := client.New(\n \"{YOUR_DOMAIN}\",\n option.WithToken(\n \"<token>\",\n ),\n )\n if err != nil {\n return\n }\n request := &management.GetDailyStatsRequestParameters{\n From: management.String(\n \"from\",\n ),\n To: management.String(\n \"to\",\n ),\n }\n mgmt.Stats.GetDaily(\n context.TODO(),\n request,\n )\n}\n"
- lang: java
label: Get daily stats
source: "package com.example.usage;\n\nimport com.auth0.client.mgmt.ManagementApi;\nimport com.auth0.client.mgmt.types.GetDailyStatsRequestParameters;\n\npublic class Example {\n public static void main(String[] args) {\n ManagementApi client = ManagementApi\n .builder()\n .domain(\"{YOUR_DOMAIN}\")\n .token(\"<token>\")\n .build();\n\n client.stats().getDaily(\n GetDailyStatsRequestParameters\n .builder()\n .from(\"from\")\n .to(\"to\")\n .build()\n );\n }\n}"
- lang: php
label: Get daily stats
source: "<?php\n\nnamespace Example;\n\nuse Auth0\\SDK\\API\\Management\\Wrapper\\ManagementClient;\nuse Auth0\\SDK\\API\\Management\\Wrapper\\ManagementClientOptions;\nuse Auth0\\SDK\\API\\Management\\Stats\\Requests\\GetDailyStatsRequestParameters;\n\n$client = new ManagementClient(new ManagementClientOptions(\n domain: '{YOUR_DOMAIN}',\n token: '<token>',\n));\n$client->stats->getDaily(\n new GetDailyStatsRequestParameters([\n 'from' => 'from',\n 'to' => 'to',\n ]),\n);\n"
- lang: python
label: Get daily stats
source: "from auth0.management import ManagementClient\n\nclient = ManagementClient(\n domain=\"{YOUR_DOMAIN}\",\n token=\"<token>\",\n)\n\nclient.stats.get_daily(\n from=\"from\",\n to=\"to\",\n)\n"
- lang: ruby
label: Get daily stats
source: "require \"auth0\"\n\nclient = Auth0::Management.new(token: \"<token>\", base_url: \"https://{YOUR_DOMAIN}/api/v2\")\n\nclient.stats.get_daily(\n from: \"from\",\n to: \"to\"\n)\n"
- lang: typescript
label: Get daily stats
source: "import { ManagementClient } from \"auth0\";\n\nasync function main() {\n const client = new ManagementClient({\n domain: \"{YOUR_DOMAIN}\",\n token: \"<token>\",\n });\n await client.stats.getDaily({\n from: \"from\",\n to: \"to\",\n });\n}\nmain();\n"
- lang: javascript
label: Get daily stats
source: "import { ManagementClient } from \"auth0\";\n\nasync function main() {\n const client = new ManagementClient({\n domain: \"{YOUR_DOMAIN}\",\n token: \"<token>\",\n });\n await client.stats.getDaily({\n from: \"from\",\n to: \"to\",\n });\n}\nmain();\n"
components:
responses:
GetStatsDailyTooManyRequests:
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsSchema'
GetStatsDailyUnauthorized:
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedSchema'
GetStatsDailyForbidden:
description: 'Insufficient scope; expected any of: read:stats.'
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenSchema'
GetStatsDailyBadRequest:
description: Invalid request query. The message will vary depending on the cause.
x-description-1: '''from'' date cannot be greater than ''to'' date.'
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestSchema'
schemas:
UnauthorizedSchema:
description: Unauthorized
type: object
properties:
message:
type: string
statusCode:
const: 401
error:
const: Unauthorized
required:
- message
- statusCode
- error
BadRequestSchema:
description: Bad Request
type: object
properties:
message:
type: string
statusCode:
const: 400
error:
const: Bad Request
required:
- message
- statusCode
- error
GetActiveUsersCountStatsResponseContent:
type: number
description: Number of active users in the last 30 days.
default: 100
ForbiddenSchema:
description: Forbidden
type: object
properties:
message:
type: string
statusCode:
const: 403
error:
const: Forbidden
required:
- message
- statusCode
- error
TooManyRequestsSchema:
description: Too Many Requests
type: object
properties:
message:
type: string
statusCode:
const: 429
error:
const: Too Many Requests
required:
- message
- statusCode
- error
DailyStats:
type: object
additionalProperties: true
properties:
date:
type: string
description: Date these events occurred in ISO 8601 format.
default: '2014-01-01T00:00:00.000Z'
logins:
type: integer
description: Number of logins on this date.
default: 100
signups:
type: integer
description: Number of signups on this date.
default: 100
leaked_passwords:
type: integer
description: Number of breached-password detections on this date (subscription required).
default: 100
updated_at:
type: string
description: Date and time this stats entry was last updated in ISO 8601 format.
default: '2014-01-01T02:00:00.000Z'
created_at:
type: string
description: Approximate date and time the first event occurred in ISO 8601 format.
default: '2014-01-01T20:00:00.000Z'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: jwt
oAuth2ClientCredentials:
type: oauth2
flows:
clientCredentials:
tokenUrl: /oauth/token/
x-form-parameters:
audience: /api/v2/
scopes:
create:actions: Create Actions
read:actions: Read Actions
update:actions: Update Actions
delete:actions: Delete Actions
create:agents: Create Agents
read:agents: Read Agents
update:agents: Update Agents
delete:agents: Delete Agents
read:anomaly_blocks: Read Anomaly Blocks
delete:anomaly_blocks: Delete Anomaly Blocks
read:attack_protection: Read Attack Protection
update:attack_protection: Update Attack Protection
create:authentication_methods: Create Authentication Methods
read:authentication_methods: Read Authentication Methods
update:authentication_methods: Update Authentication Methods
delete:authentication_methods: Delete Authentication Methods
read:branding: Read Branding
update:branding: Update Branding
delete:branding: Delete Branding
create:client_credentials: Create Client Credentials
read:client_credentials: Read Client Credentials
update:client_credentials: Update Client Credentials
delete:client_credentials: Delete Client Credentials
create:client_grants: Create Client Grants
read:client_grants: Read Client Grants
update:client_grants: Update Client Grants
delete:client_grants: Delete Client Grants
read:client_keys: Read Client Keys
update:client_keys: Update Client Keys
read:client_summary: Read Client Summary
update:client_token_vault_privileged_access: Update Client Token Vault Privileged Access
create:clients: Create Clients
read:clients: Read Clients
update:clients: Update Clients
delete:clients: Delete Clients
create:connection_profiles: Create Connection Profiles
read:connection_profiles: Read Connection Profiles
update:connection_profiles: Update Connection Profiles
delete:connection_profiles: Delete Connection Profiles
create:connections: Create Connections
read:connections: Read Connections
update:connections: Update Connections
delete:connections: Delete Connections
create:connections_keys: Create Connections Keys
read:connections_keys: Read Connections Keys
update:connections_keys: Update Connections Keys
read:current_user: Read Current User
delete:current_user: Delete Current User
create:current_user_device_credentials: Create Current User Device Credentials
delete:current_user_device_credentials: Delete Current User Device Credentials
update:current_user_identities: Update Current User Identities
update:current_user_metadata: Update Current User Metadata
create:custom_domains: Create Custom Domains
read:custom_domains: Read Custom Domains
update:custom_domains: Update Custom Domains
delete:custom_domains: Delete Custom Domains
create:custom_signing_keys: Create Custom Signing Keys
read:custom_signing_keys: Read Custom Signing Keys
update:custom_signing_keys: Update Custom Signing Keys
delete:custom_signing_keys: Delete Custom Signing Keys
read:device_credentials: Read Device Credentials
delete:device_credentials: Delete Device Credentials
create:directory_provisionings: Create Directory Provisionings
read:directory_provisionings: Read Directory Provisionings
update:directory_provisionings: Update Directory Provisionings
delete:directory_provisionings: Delete Directory Provisionings
create:email_provider: Create Email Provider
read:email_provider: Read Email Provider
update:email_provider: Update Email Provider
delete:email_provider: Delete Email Provider
create:email_templates: Create Email Templates
read:email_templates: Read Email Templates
update:email_templates: Update Email Templates
create:encryption_keys: Create Encryption Keys
read:encryption_keys: Read Encryption Keys
update:encryption_keys: Update Encryption Keys
delete:encryption_keys: Delete Encryption Keys
read:event_deliveries: Read Event Deliveries
update:event_deliveries: Update Event Deliveries
create:event_streams: Create Event Streams
read:event_streams: Read Event Streams
update:event_streams: Update Event Streams
delete:event_streams: Delete Event Streams
read:events: Read Events
create:experimentation: Create Experimentation
read:experimentation: Read Experimentation
update:experimentation: Update Experimentation
delete:experimentation: Delete Experimentation
create:flows: Create Flows
read:flows: Read Flows
update:flows: Update Flows
delete:flows: Delete Flows
read:flows_executions: Read Flows Executions
delete:flows_executions: Delete Flows Executions
create:flows_vault_connections: Create Flows Vault Connections
read:flows_vault_connections: Read Flows Vault Connections
update:flows_vault_connections: Update Flows Vault Connections
delete:flows_vault_connections: Delete Flows Vault Connections
create:forms: Create Forms
read:forms: Read Forms
update:forms: Update Forms
delete:forms: Delete Forms
read:grants: Read Grants
delete:grants: Delete Grants
read:group_members: Read Group Members
create:group_roles: Create Group Roles
read:group_roles: Read Group Roles
delete:group_roles: Delete Group Roles
read:groups: Read Groups
delete:groups: Delete Groups
create:guardian_enrollment_tickets: Create Guardian Enrollment Tickets
read:guardian_enrollments: Read Guardian Enrollments
delete:guardian_enrollments: Delete Guardian Enrollments
read:guardian_factors: Read Guardian Factors
update:guardian_factors: Update Guardian Factors
create:hooks: Create Hooks
read:hooks: Read Hooks
update:hooks: Update Hooks
delete:hooks: Delete Hooks
create:log_streams: Create Log Streams
read:log_streams: Read Log Streams
update:log_streams: Update Log Streams
delete:log_streams: Delete Log Streams
read:logs: Read Logs
read:logs_users: Read Logs Users
read:mfa_policies: Read Mfa Policies
update:mfa_policies: Update Mfa Policies
create:network_acls: Create Network Acls
read:network_acls: Read Network Acls
update:network_acls: Update Network Acls
delete:network_acls: Delete Network Acls
create:organization_client_grants: Create Organization Client Grants
read:organization_client_grants: Read Organization Client Grants
delete:organization_client_grants: Delete Organization Client Grants
create:organization_connections: Create Organization Connections
read:organization_connections: Read Organization Connections
update:organization_connections: Update Organization Connections
delete:organization_connections: Delete Organization Connections
create:organization_discovery_domains: Create Organization Discovery Domains
read:organization_discovery_domains: Read Organization Discovery Domains
update:organization_discovery_domains: Update Organization Discovery Domains
delete:organization_discovery_domains: Delete Organization Discovery Domains
create:organization_group_roles: Create Organization Group Roles
read:organization_group_roles: Read Organization Group Roles
delete:organization_group_roles: Delete Organization Group Roles
read:organization_groups: Read Organization Groups
create:organization_invitations: Create Organization Invitations
read:organization_invitations: Read Organization Invitations
delete:organization_invitations: Delete Organization Invitations
read:organization_member_effective_roles: Read Organization Member Effective Roles
read:organization_member_role_source_groups: Read Organization Member Role Source Groups
create:organization_member_roles: Create Organization Member Roles
read:organization_member_roles: Read Organization Member Roles
delete:organization_member_roles: Delete Organization Member Roles
create:organization_members: Create Organization Members
read:organization_members: Read Organization Members
delete:organization_members: Delete Organization Members
create:organizations: Create Organizations
read:organizations: Read Organizations
update:organizations: Update Organizations
delete:organizations: Delete Organizations
read:organizations_summary: Read Organizations Summary
create:phone_providers: Create Phone Providers
read:phone_providers: Read Phone Providers
update:phone_providers: Update Phone Providers
delete:phone_providers: Delete Phone Providers
create:phone_templates: Create Phone Templates
read:phone_templates: Read Phone Templates
update:phone_templates: Update Phone Templates
delete:phone_templates: Delete Phone Templates
read:prompts: Read Prompts
update:prompts: Update Prompts
create:rate_limit_policies: Create Rate Limit Policies
read:rate_limit_policies: Read Rate Limit Policies
update:rate_limit_policies: Update Rate Limit Policies
delete:rate_limit_policies: Delete Rate Limit Policies
read:refresh_tokens: Read Refresh Tokens
update:refresh_tokens: Update Refresh Tokens
delete:refresh_tokens: Delete Refresh Tokens
create:resource_servers: Create Resource Servers
read:resource_servers: Read Resource Servers
update:resource_servers: Update Resource Servers
delete:resource_servers: Delete Resource Servers
create:role_members: Create Role Members
read:role_members: Read Role Members
delete:role_members: Delete Role Members
create:roles: Create Roles
read:roles: Read Roles
update:roles: Update Roles
delete:roles: Delete Roles
create:rules: Create Rules
read:rules: Read Rules
update:rules: Update Rules
delete:rules: Delete Rules
read:rules_configs: Read Rules Configs
update:rules_configs: Update Rules Configs
delete:rules_configs: Delete Rules Configs
create:scim_config: Create Scim Config
read:scim_config: Read Scim Config
update:scim_config: Update Scim Config
delete:scim_config: Delete Scim Config
create:scim_token: Create Scim Token
read:scim_token: Read Scim Token
delete:scim_token: Delete Scim Token
read:self_service_profile_custom_texts: Read Self Service Profile Custom Texts
update:self_service_profile_custom_texts: Update Self Service Profile Custom Texts
create:self_service_profiles: Create Self Service Profiles
read:self_service_profiles: Read Self Service Profiles
update:self_service_profiles: Update Self Service Profiles
delete:self_service_profiles: Delete Self Service Profiles
read:sessions: Read Sessions
update:sessions: Update Sessions
delete:sessions: Delete Sessions
create:signing_keys: Create Signing Keys
read:signing_keys: Read Signing Keys
update:signing_keys: Update Signing Keys
create:sso_access_tickets: Create Sso Access Tickets
delete:sso_access_tickets: Delete Sso Access Tickets
read:stats: Read Stats
read:tenant_settings: Read Tenant Settings
update:tenant_settings: Update Tenant Settings
create:token_exchange_profiles: Create Token Exchange Profiles
read:token_exchange_profiles: Read Token Exchange Profiles
update:token_exchange_profiles: Update Token Exchange Profiles
delete:token_exchange_profiles: Delete Token Exchange Profiles
create:user_attribute_profiles: Create User Attribute Profiles
read:user_attribute_profiles: Read User Attribute Profiles
update:user_attribute_profiles: Update User Attribute Profiles
delete:user_attribute_profiles: Delete User Attribute Profiles
read:user_effective_permissions: Read User Effective Permissions
read:user_effective_roles: Read User Effective Roles
read:user_idp_tokens: Read User Idp Tokens
read:user_permission_source_roles: Read User Permission Source Roles
read:user_role_source_groups: Read User Role Source Groups
create:user_tickets: Create User Tickets
create:users: Create Users
read:users: Read Users
update:users: Update Users
delete:users: Delete Users
update:users_app_metadata: Update Users App Metadata
create:vdcs_templates: Create Vdcs Templates
read:vdcs_templates: Read Vdcs Templates
update:vdcs_templates: Update Vdcs Templates
delete:vdcs_templates: Delete Vdcs Templates
create:client_profiles: Create Client Profiles
read:client_profiles: Read Client Profiles
update:client_profiles: Update Client Profiles
delete:client_profiles: Delete Client Profiles
create:organization_clients: Create Organization Client Associations
read:organization_clients: Read Organization Client Associations
update:organization_clients: Update Organization Client Associations
delete:organization_clients: Delete Organization Client Associations
create:network_acl_keys: Create Network ACL Keys
read:network_acl_keys: Read Network ACL Keys
delete:network_acl_keys: Delete Network ACL Keys
externalDocs:
description: Auth0 Management API Documentation
url: https://auth0.com/docs/api/management/v2/