> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbrix.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Get API Key Statistics

> Get usage statistics for all API keys in an organization

Retrieves usage statistics for all API keys in an organization.

## Permissions

User must be a **member** of the organization.

## Statistics Included

* Total number of API keys
* Active vs. revoked keys
* Total API requests across all keys
* Rate limit hits and errors
* Most recently used keys

## Example

```bash theme={null}
curl -X GET http://localhost:3001/api/organizations/{organizationId}/api-keys/stats \
  -H "Authorization: Bearer <token>"
```

## Use Cases

* Monitor API usage across the organization
* Identify unused or inactive keys
* Track rate limit consumption
* Audit API access patterns


## OpenAPI

````yaml GET /organizations/{organizationId}/api-keys/stats
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /organizations/{organizationId}/api-keys/stats:
    get:
      tags:
        - api-keys
      summary: Get API key statistics
      description: Get usage statistics for all API keys in an organization
      operationId: ApiKeysController_getStats
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Statistics retrieved successfully
        '401':
          description: Authentication required. Provide a valid bearer token.
        '403':
          description: Access denied. User is not a member of this organization.
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````