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

# Get per-user account counts

> Returns purchased, active and failed account totals for the user, aggregated across duplicate accounts in the same group. Cached for 5 minutes.



## OpenAPI

````yaml /openapi.json get /api/users/{id}/accounts/stats/
openapi: 3.0.3
info:
  title: TBBO API
  version: 1.0.0
  description: >
    Authentication uses short-lived session tokens (3 hours).


    Send the token with every request using the `Authorization` header:


    ```

    Authorization: Token <token>

    ```


    Example:


    ```

    Authorization: Token 123abc456def789

    ```


    To obtain a token, call `POST /auth/login/` with valid credentials. The
    response includes a `key` value. Use that value in the header above for
    subsequent API calls.


    How to find required IDs:


    - `challenge_id`: Prop Tech Configuration -> Challenges

    - `user_id`: Tickblaze Manager -> Users

    - `account_id`: Tickblaze Manager -> Accounts 
servers: []
security: []
tags:
  - name: withdrawals
    description: Withdrawal related endpoints
    x-displayName: Withdrawals
paths:
  /api/users/{id}/accounts/stats/:
    get:
      tags:
        - Users
      summary: Get per-user account counts
      description: >-
        Returns purchased, active and failed account totals for the user,
        aggregated across duplicate accounts in the same group. Cached for 5
        minutes.
      operationId: api_users_accounts_stats_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this user.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAccountCounts'
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    UserAccountCounts:
      type: object
      properties:
        total_accounts_purchased:
          type: integer
          readOnly: true
        total_active_accounts:
          type: integer
          readOnly: true
        total_failed_accounts:
          type: integer
          readOnly: true
      required:
        - total_accounts_purchased
        - total_active_accounts
        - total_failed_accounts
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.