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

# Delete MDR Usage Report

> Delete messaging usage report by id



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/usage-reports.yml delete /reports/mdr_usage_reports/{id}
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:
  /reports/mdr_usage_reports/{id}:
    delete:
      tags:
        - MDR Usage Reports
      summary: Delete MDR Usage Report
      description: Delete messaging usage report by id
      operationId: DeleteUsageReport
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MdrDeleteUsageReportsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reporting_ErrorResponse'
      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 mdrUsageReport = await client.reports.mdrUsageReports.delete(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );

            console.log(mdrUsageReport.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
            )
            mdr_usage_report = client.reports.mdr_usage_reports.delete(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(mdr_usage_report.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\tmdrUsageReport, err := client.Reports.MdrUsageReports.Delete(context.TODO(), \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", mdrUsageReport.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.reports.mdrusagereports.MdrUsageReportDeleteParams;

            import
            com.telnyx.sdk.models.reports.mdrusagereports.MdrUsageReportDeleteResponse;


            public final class Main {
                private Main() {}

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

                    MdrUsageReportDeleteResponse mdrUsageReport = client.reports().mdrUsageReports().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            mdr_usage_report =
            telnyx.reports.mdr_usage_reports.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(mdr_usage_report)
        - lang: CLI
          source: |-
            telnyx reports:mdr-usage-reports delete \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  schemas:
    MdrDeleteUsageReportsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MdrUsageReportResponse'
    reporting_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/reporting_Error'
    MdrUsageReportResponse:
      type: object
      properties:
        id:
          type: string
          description: Identifies the resource
          format: uuid
        start_date:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        end_date:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        connections:
          type: array
          items:
            type: integer
            format: int64
        aggregation_type:
          type: string
          enum:
            - NO_AGGREGATION
            - PROFILE
            - TAGS
        status:
          type: string
          enum:
            - PENDING
            - COMPLETE
            - FAILED
            - EXPIRED
        report_url:
          type: string
          example: http://portal.telnyx.com/downloads/report_name_8hvb45Gu.csv
        result:
          type: array
          items:
            $ref: '#/components/schemas/MdrUsageRecord'
        created_at:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        updated_at:
          type: string
          format: date-time
          example: '2020-07-01T00:00:00-06:00'
        profiles:
          type: string
          example: My profile
        record_type:
          type: string
          example: mdr_usage_report
    reporting_Error:
      type: object
      properties:
        code:
          type: string
          example: '10011'
        title:
          type: string
          example: Bad Request
        detail:
          type: string
          example: Invalid parameter value
    MdrUsageRecord:
      type: object
      properties:
        cost:
          type: string
          example: '0'
        direction:
          type: string
          example: outbound
        product:
          type: string
          example: outbound
        connection:
          type: string
          example: all
        received:
          type: string
          example: '0'
        delivered:
          type: string
          example: '0'
        currency:
          type: string
          example: USD
        parts:
          type: string
          example: '0'
        sent:
          type: string
          example: '0'
        profile_id:
          type: string
          example: All
        tags:
          type: string
          example: All
        message_type:
          type: string
          example: SMS
        tn_type:
          type: string
          example: TF
        carrier_passthrough_fee:
          type: string
          example: '0'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````