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

# User Analytics

> Per-user run and spend aggregates for a project.

Only **project admins** can call this endpoint. Results are **paginated**: pass `page_token` from the previous response's `next_page_token` to fetch the next page. The response includes `from` and `to` for the window you requested.


## OpenAPI

````yaml GET /orgs/{org_id}/projects/{project_id}/analytics/users
openapi: 3.1.0
info:
  title: Timbal Platform API
  description: Public API documentation for the Timbal platform
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.timbal.ai
    description: Production
  - url: https://api.dev.timbal.ai
    description: Development
security: []
tags:
  - name: ace
    description: Action Control Engine (ACE) operations
  - name: analytics
    description: Project analytics
  - name: billing
    description: Subscriptions, usage, and payment-related operations
  - name: content
    description: Re-sign stored content URLs
  - name: files
    description: File operations
  - name: iam
    description: IAM — actions, roles, users, and authorization introspection
  - name: k2
    description: Knowledge Bases v2 operations
  - name: orgs
    description: Organization operations
  - name: projects
    description: Project operations
  - name: runs
    description: Execution operations
  - name: templates
    description: Public project template catalog
  - name: users
    description: Authenticated user profile
paths:
  /orgs/{org_id}/projects/{project_id}/analytics/users:
    get:
      tags:
        - analytics
      description: Per-user run and spend aggregates for a project.
      operationId: handler
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: from
          in: query
          description: Inclusive range start (epoch milliseconds).
          required: true
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: Exclusive range end (epoch milliseconds).
          required: true
          schema:
            type: integer
            format: int64
        - name: user_id
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: page_token
          in: query
          description: >-
            Opaque offset for the next page (from the previous response’s
            `next_page_token`).
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: User analytics page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectAnalyticsUsersBody'
        '403':
          description: Forbidden
        '500':
          description: Error
      security:
        - bearer_auth: []
components:
  schemas:
    ProjectAnalyticsUsersBody:
      type: object
      required:
        - from
        - to
        - users
      properties:
        from:
          type: integer
          format: int64
        next_page_token:
          type:
            - string
            - 'null'
        to:
          type: integer
          format: int64
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserRow'
    UserRow:
      type: object
      required:
        - user_id
        - user_name
        - user_email
        - n_success
        - n_error
        - n_running
        - n_timeout
        - usd
        - credits
      properties:
        credits:
          type: number
          format: double
        n_error:
          type: integer
          format: int64
        n_running:
          type: integer
          format: int64
        n_success:
          type: integer
          format: int64
        n_timeout:
          type: integer
          format: int64
        usd:
          type: number
          format: double
        user_email:
          type: string
        user_id:
          type: integer
          format: int64
        user_name:
          type: string
        user_photo_url:
          type:
            - string
            - 'null'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Timbal API key. Obtain your API key from the Timbal platform settings.
        See [Authentication](/api-reference/authentication) for more
        information.

````