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

# Get billing summary

> Retrieve billing summary for a time period



## OpenAPI

````yaml GET /analytics/billing-summary
openapi: 3.0.3
info:
  title: NativeMessage API
  version: 1.0.0
  description: Complete API documentation for NativeMessage platform
  contact:
    name: NativeMessage Support
    email: support@nativemessage.com
servers:
  - url: https://api-message.nativehub.live/api/v1
    description: Production server
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /analytics/billing-summary:
    get:
      tags:
        - Analytics
      summary: Get billing summary
      description: Retrieve billing summary for a time period
      operationId: getBillingSummary
      parameters:
        - name: date_from
          in: query
          description: Start date for billing summary
          schema:
            type: string
            format: date
        - name: date_to
          in: query
          description: End date for billing summary
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Billing summary retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_revenue:
                    type: number
                  total_cost:
                    type: number
                  total_margin:
                    type: number
                  by_currency:
                    type: array
                    items:
                      type: object
                      properties:
                        currency:
                          type: string
                        revenue:
                          type: number
                        cost:
                          type: number
                example:
                  total_revenue: 6271.5
                  total_cost: 3756.9
                  total_margin: 2514.6
                  by_currency:
                    - currency: USD
                      revenue: 6271.5
                      cost: 3756.9
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````