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

# Get billing analytics

> Retrieves billing analytics for all projects within an organization



## OpenAPI

````yaml get /organization/billing_analytics
openapi: 3.0.1
info:
  title: BeyondWords REST API
  description: |-
    This is the documentation for the BeyondWords REST API.
              You can use this API to use BeyondWords programmatically.
              You can get your API Key and Project ID for each project in the Project settings tab in the BeyondWords
              <a href="https://dash.beyondwords.io/dashboard">dashboard</a>.
  version: 1.0.0
servers:
  - url: https://api.beyondwords.io/v1
security: []
paths:
  /organization/billing_analytics:
    get:
      tags:
        - Billing analytics
      summary: Organization billing analytics
      description: Retrieves billing analytics for all projects within an organization
      operationId: organization#billing_analytics
      parameters:
        - name: aggregation
          in: query
          schema:
            type: string
            enum:
              - all
              - hour
              - day
              - week
              - month
              - year
          required: false
          description: |2-

                      The way to aggregate the analytics. Possible values are all (aggregate all data together),
                      year (aggregate data on a yearly basis), month (aggregate data on a yearly basis),
                      week (aggregate data on a yearly basis), day (aggregate data on a yearly basis), or hour
                      (aggregate data on an hourly basis, limited to a time_range 7 days or less).
        - name: time_range[start]
          in: query
          required: false
          description: >-
            The start date of the aggregation period. The value of this property
            should be a string in
                      the format yyyy-mm-dd according to ISO 8601.
          schema:
            type: string
        - name: time_range[end]
          in: query
          required: false
          description: >-
            The end date of the aggregation period. The value of this property
            should be a string
                      in the format yyyy-mm-dd according to ISO 8601. If this is set to today, the current day is still
                      in progress and therefore only partial analytics data is returned until the day ends.
          schema:
            type: string
        - name: event_type
          in: query
          schema:
            type: string
            enum:
              - content
              - characters
              - articles_credits
              - credits
              - total_characters
          required: false
        - name: entity_type
          in: query
          schema:
            type: string
            enum:
              - podcast
              - video
          required: false
        - name: group_by[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - by_project
                - by_voice
                - by_content
          required: false
        - name: filter[project_ids][]
          in: query
          schema:
            type: array
            items:
              type: integer
          required: false
        - name: filter[voice_ids][]
          in: query
          schema:
            type: array
            items:
              type: integer
          required: false
        - name: filter[content_ids][]
          in: query
          schema:
            type: array
            items:
              type: string
          required: false
        - name: filter[source_ids][]
          in: query
          schema:
            type: array
            items:
              type: string
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                example:
                  $ref: '#/components/examples/billingAnalyticsExample'
              schema:
                $ref: '#/components/schemas/billingAnalytics'
          headers:
            X-BeyondWords-Aggregation:
              description: Analytics aggregation
              schema:
                type: string
              required: false
            X-BeyondWords-Time-Range-Start:
              description: Analytics start time
              schema:
                type: string
              required: false
            X-BeyondWords-Time-Range-End:
              description: Analytics end time
              schema:
                type: string
              required: false
      security:
        - apiKey: []
components:
  examples:
    billingAnalyticsExample:
      summary: Sample list of billing analytics response
      value:
        projects:
          - id: 1
            name: Project A
          - id: 2
            name: Project B
        analytics:
          - project_id: 1
            counter: 5
            start: 2099-12-31 23:59:59 UTC
          - project_id: 2
            counter: 3
            start: 2099-12-31 23:59:59 UTC
  schemas:
    billingAnalytics:
      type: object
      properties:
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
                nullable: true
        voices:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
        content:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              title:
                type: string
                nullable: true
              source_id:
                type: string
                nullable: true
        analytics:
          type: array
          items:
            type: object
            properties:
              project_id:
                type: integer
                nullable: true
              voice_id:
                type: integer
                nullable: true
              content_id:
                type: string
                nullable: true
              counter:
                type: integer
              start:
                type: string
                format: date-time
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````