> ## 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.

# Submit telco data usage report

> Submit a new telco data usage report



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/usage-reports.yml post /legacy_reporting/usage_reports/number_lookup
openapi: 3.1.0
info:
  title: Telnyx Usage Reports API
  version: 2.0.0
  description: API for Usage reports.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /legacy_reporting/usage_reports/number_lookup:
    post:
      tags:
        - Telco Data Usage Reports
      summary: Submit telco data usage report
      description: Submit a new telco data usage report
      operationId: submitTelcoDataUsageReport
      requestBody:
        description: Telco data usage request data
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/TelcoDataUsageRequest'
        required: true
      responses:
        '200':
          description: Successfully submitted telco data usage report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelcoDataPostUsageReportResponse'
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Unprocessable entity
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
      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 numberLookup = await
            client.legacy.reporting.usageReports.numberLookup.create();


            console.log(numberLookup.data);
        - lang: Python
          source: >-
            import os

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            number_lookup =
            client.legacy.reporting.usage_reports.number_lookup.create()

            print(number_lookup.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\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\tnumberLookup, err := client.Legacy.Reporting.UsageReports.NumberLookup.New(context.TODO(), telnyx.LegacyReportingUsageReportNumberLookupNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", numberLookup.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.legacy.reporting.usagereports.numberlookup.NumberLookupCreateParams;

            import
            com.telnyx.sdk.models.legacy.reporting.usagereports.numberlookup.NumberLookupCreateResponse;


            public final class Main {
                private Main() {}

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

                    NumberLookupCreateResponse numberLookup = client.legacy().reporting().usageReports().numberLookup().create();
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            number_lookup =
            telnyx.legacy.reporting.usage_reports.number_lookup.create


            puts(number_lookup)
        - 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 {
              $numberLookup = $client
                ->legacy
                ->reporting
                ->usageReports
                ->numberLookup
                ->create(
                aggregationType: 'ALL',
                endDate: '2025-02-10',
                managedAccounts: [
                  'f47ac10b-58cc-4372-a567-0e02b2c3d479',
                  '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
                ],
                startDate: '2025-02-10',
              );

              var_dump($numberLookup);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx legacy:reporting:usage-reports:number-lookup create \
              --api-key 'My API Key'
components:
  schemas:
    TelcoDataUsageRequest:
      type: object
      properties:
        startDate:
          type: string
          format: date
          description: Start date for the usage report
          example: '2025-02-10'
        endDate:
          type: string
          format: date
          description: End date for the usage report
          example: '2025-02-10'
        aggregationType:
          type: string
          description: Type of aggregation for the report
          enum:
            - ALL
            - BY_ORGANIZATION_MEMBER
          example: ALL
        managedAccounts:
          type: array
          description: List of managed accounts to include in the report
          items:
            type: string
          example:
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
            - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
    TelcoDataPostUsageReportResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TelcoDataUsageReportResponse'
    TelcoDataUsageReportResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the report
          example: 9783f4d7-0bfc-427a-9d6b-bc659ad16e5b
        start_date:
          type: string
          format: date
          description: Start date of the report period
          example: '2025-11-01'
        end_date:
          type: string
          format: date
          description: End date of the report period
          example: '2025-12-01'
        aggregation_type:
          type: string
          description: Type of aggregation used in the report
          example: ALL
        status:
          type: string
          description: Current status of the report
          example: COMPLETE
        report_url:
          type: string
          description: URL to download the complete report
          example: >-
            https://portal-cdrs-usage.s3.amazonaws.com/telco_data_usage_report_2025-12-02.csv
        created_at:
          type: string
          format: date-time
          description: Timestamp when the report was created
          example: '2025-12-02T20:20:57.196925Z'
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the report was last updated
          example: '2025-12-02T20:21:08.237091Z'
        managed_accounts:
          type: array
          description: List of managed account IDs included in the report
          items:
            type: string
          example: []
        result:
          type: array
          description: Array of usage records
          items:
            $ref: '#/components/schemas/TelcoDataUsageRecord'
        record_type:
          type: string
          description: Record type identifier
          example: TelcoDataUsageReport
      description: Telco data usage report response
    TelcoDataUsageRecord:
      type: object
      properties:
        user_id:
          type: string
          format: uuid
          description: User ID
          example: d37bdd47-f301-42ec-b2ad-5a0465bfb632
        aggregations:
          type: array
          description: List of aggregations by lookup type
          items:
            $ref: '#/components/schemas/TelcoDataAggregation'
        record_type:
          type: string
          description: Record type identifier
          example: TelcoDataUsageRecord
    TelcoDataAggregation:
      type: object
      properties:
        type:
          type: string
          description: Type of telco data lookup
          example: CNAM
        total_dips:
          type: integer
          description: Total number of lookups performed
          example: 3
        total_cost:
          type: number
          description: Total cost for this aggregation
          example: 0.009
        currency:
          type: string
          description: Currency code
          example: USD
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````