> ## 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 a billing group



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/billing-groups.yml delete /billing_groups/{id}
openapi: 3.1.0
info:
  title: Telnyx Billing Groups API
  version: 2.0.0
  description: API for Billing groups.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /billing_groups/{id}:
    delete:
      tags:
        - Billing Groups
      summary: Delete a billing group
      operationId: DeleteBillingGroup
      parameters:
        - name: id
          in: path
          description: The id of the billing group
          required: true
          example: f5586561-8ff0-4291-a0ac-84fe544797bd
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Expected billing group response to a valid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BillingGroup'
          headers: {}
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
        '409':
          $ref: '#/components/responses/ConflictErrorResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityErrorResponse'
        default:
          $ref: '#/components/responses/GenericErrorResponse'
      deprecated: false
      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 billingGroup = await
            client.billingGroups.delete('f5586561-8ff0-4291-a0ac-84fe544797bd');


            console.log(billingGroup.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
            )
            billing_group = client.billing_groups.delete(
                "f5586561-8ff0-4291-a0ac-84fe544797bd",
            )
            print(billing_group.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\tbillingGroup, err := client.BillingGroups.Delete(context.TODO(), \"f5586561-8ff0-4291-a0ac-84fe544797bd\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", billingGroup.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.billinggroups.BillingGroupDeleteParams;

            import
            com.telnyx.sdk.models.billinggroups.BillingGroupDeleteResponse;


            public final class Main {
                private Main() {}

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

                    BillingGroupDeleteResponse billingGroup = client.billingGroups().delete("f5586561-8ff0-4291-a0ac-84fe544797bd");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            billing_group =
            telnyx.billing_groups.delete("f5586561-8ff0-4291-a0ac-84fe544797bd")


            puts(billing_group)
        - lang: CLI
          source: |-
            telnyx billing-groups delete \
              --api-key 'My API Key' \
              --id f5586561-8ff0-4291-a0ac-84fe544797bd
components:
  schemas:
    BillingGroup:
      type: object
      properties:
        record_type:
          type: string
          enum:
            - billing_group
          description: Identifies the type of the resource.
          example: billing_group
        id:
          type: string
          format: uuid
          description: Identifies the type of resource.
          example: f5586561-8ff0-4291-a0ac-84fe544797bd
        organization_id:
          type: string
          format: uuid
          description: Identifies the organization that owns the resource.
          example: f1486bae-f067-460c-ad43-73a92848f902
        name:
          type: string
          description: A user-specified name for the billing group
          example: My billing group name
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2019-10-15T10:07:15.527Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2019-10-15T10:07:15.527Z'
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was removed.
          example: null
      example:
        record_type: billing_group
        id: f5586561-8ff0-4291-a0ac-84fe544797bd
        organization_id: f1486bae-f067-460c-ad43-73a92848f902
        name: My billing group name
        created_at: '2019-10-15T10:07:15.527Z'
        updated_at: '2019-10-15T10:07:15.527Z'
        deleted_at: null
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/billing-group_Error'
    billing_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/billing_Error'
      type: object
    billing-group_Error:
      type: object
      required:
        - code
        - title
      properties:
        code:
          type: integer
          format: int32
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties: {}
          additionalProperties: true
    billing_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  responses:
    ForbiddenErrorResponse:
      description: Insufficient permissions to access billing group
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    NotFoundErrorResponse:
      description: Billing group not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    ConflictErrorResponse:
      description: Resource conflict or in use
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    UnprocessableEntityErrorResponse:
      description: Invalid request data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/billing_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````