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

# Get monthly charges breakdown

> Retrieve a detailed breakdown of monthly charges for phone numbers in a specified date range. The date range cannot exceed 31 days.



## OpenAPI

````yaml /openapi/source/external/billing/charges.json get /charges_breakdown
openapi: 3.1.0
info:
  title: Telnyx API
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  description: Monthly charges summary information.
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Monthly Charges
    description: Monthly Charges Report
paths:
  /charges_breakdown:
    get:
      summary: Get monthly charges breakdown
      description: >-
        Retrieve a detailed breakdown of monthly charges for phone numbers in a
        specified date range. The date range cannot exceed 31 days.
      operationId: GetMonthlyChargesBreakdown
      parameters:
        - name: start_date
          in: query
          description: Start date for the charges breakdown in ISO date format (YYYY-MM-DD)
          required: true
          schema:
            type: string
            format: date
            example: '2025-05-01'
        - name: end_date
          in: query
          description: >-
            End date for the charges breakdown in ISO date format (YYYY-MM-DD).
            If not provided, defaults to start_date + 1 month. The date is
            exclusive, data for the end_date itself is not included in the
            report. The interval between start_date and end_date cannot exceed
            31 days.
          required: false
          schema:
            type: string
            format: date
            example: '2025-06-01'
        - name: format
          in: query
          description: Response format
          required: false
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
            example: json
      responses:
        '200':
          description: Monthly charges breakdown
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyChargesBreakdownResponse'
            text/csv:
              schema:
                type: string
                description: CSV format of the charges breakdown
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityErrorResponse'
        default:
          $ref: '#/components/responses/GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const chargesBreakdown = await client.chargesBreakdown.retrieve({
            start_date: '2025-05-01' });


            console.log(chargesBreakdown.data);
        - lang: Python
          source: |
            import os
            from datetime import date
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            charges_breakdown = client.charges_breakdown.retrieve(
                start_date=date.fromisoformat("2025-05-01"),
            )
            print(charges_breakdown.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargesBreakdown, err := client.ChargesBreakdown.Get(context.TODO(), telnyx.ChargesBreakdownGetParams{\n\t\tStartDate: time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargesBreakdown.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.chargesbreakdown.ChargesBreakdownRetrieveParams;

            import
            com.telnyx.sdk.models.chargesbreakdown.ChargesBreakdownRetrieveResponse;

            import java.time.LocalDate;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    ChargesBreakdownRetrieveParams params = ChargesBreakdownRetrieveParams.builder()
                        .startDate(LocalDate.parse("2025-05-01"))
                        .build();
                    ChargesBreakdownRetrieveResponse chargesBreakdown = client.chargesBreakdown().retrieve(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            charges_breakdown = telnyx.charges_breakdown.retrieve(start_date:
            "2025-05-01")


            puts(charges_breakdown)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $chargesBreakdown = $client->chargesBreakdown->retrieve(
                startDate: '2025-05-01', endDate: '2025-06-01', format: 'json'
              );

              var_dump($chargesBreakdown);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx charges-breakdown retrieve \
              --api-key 'My API Key' \
              --start-date "'2025-05-01'"
components:
  schemas:
    MonthlyChargesBreakdownResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BreakdownData'
      required:
        - data
    BreakdownData:
      type: object
      properties:
        user_id:
          type: string
          description: User identifier
          example: 0db0b4aa-a83d-4d4f-ad9b-3ba7c1ac2ce8
        start_date:
          type: string
          format: date
          description: Start date of the breakdown period
          example: '2025-05-01'
        end_date:
          type: string
          format: date
          description: End date of the breakdown period
          example: '2025-06-01'
        user_email:
          type: string
          format: email
          description: User email address
          example: user@example.com
        currency:
          type: string
          description: Currency code
          example: USD
        results:
          type: array
          items:
            $ref: '#/components/schemas/NumberBreakdownResult'
          description: List of phone number charge breakdowns
      required:
        - user_id
        - start_date
        - end_date
        - user_email
        - currency
        - results
    Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    NumberBreakdownResult:
      type: object
      properties:
        tn:
          type: string
          description: Phone number
          example: '+15551234567'
        charge_type:
          type: string
          description: Type of charge for the number
          example: local
        service_owner_user_id:
          type: string
          description: User ID of the service owner
          example: 0db0b4aa-a83d-4d4f-ad9b-3ba7c1ac2ce8
        service_owner_email:
          type: string
          format: email
          description: Email address of the service owner
          example: user@example.com
        services:
          type: array
          items:
            $ref: '#/components/schemas/ServiceDetail'
          description: List of services associated with this number
      required:
        - tn
        - charge_type
        - service_owner_user_id
        - service_owner_email
        - services
    Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
          format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
    ServiceDetail:
      type: object
      properties:
        cost_type:
          type: string
          description: Type of cost (MRC or OTC)
          example: MRC
        name:
          type: string
          description: Service name
          example: Local DIDs
        cost:
          type: string
          description: Cost per unit as decimal string
          example: '1.50'
      required:
        - cost_type
        - name
        - cost
  responses:
    BadRequestErrorResponse:
      description: Invalid request parameters or date range
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10015'
                title: Bad Request
                detail: The request failed because it was not well-formed.
    UnprocessableEntityErrorResponse:
      description: User account not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10027'
                title: Unprocessable Entity
                detail: >-
                  The server understood the syntax of the request but was unable
                  to process the instructions.
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10007'
                title: Unexpected error
                detail: An unexpected error occured.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````