> ## 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 Virtual Cross Connect

> Delete a Virtual Cross Connect.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/networking/networking.yml delete /virtual_cross_connects/{id}
openapi: 3.1.0
info:
  title: Telnyx Networking API
  version: 2.0.0
  description: API for Networking.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /virtual_cross_connects/{id}:
    delete:
      tags:
        - Virtual Cross Connects
      summary: Delete a Virtual Cross Connect
      description: Delete a Virtual Cross Connect.
      operationId: DeleteVirtualCrossConnect
      parameters:
        - $ref: '#/components/parameters/ResourceId'
      responses:
        '200':
          $ref: '#/components/responses/VirtualCrossConnectResponse'
        '422':
          $ref: '#/components/responses/netapps_GenericErrorResponse'
        default:
          $ref: '#/components/responses/netapps_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 virtualCrossConnect = await
            client.virtualCrossConnects.delete(
              '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
            );


            console.log(virtualCrossConnect.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
            )
            virtual_cross_connect = client.virtual_cross_connects.delete(
                "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
            )
            print(virtual_cross_connect.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\tvirtualCrossConnect, err := client.VirtualCrossConnects.Delete(context.TODO(), \"6a09cdc3-8948-47f0-aa62-74ac943d6c58\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", virtualCrossConnect.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.virtualcrossconnects.VirtualCrossConnectDeleteParams;

            import
            com.telnyx.sdk.models.virtualcrossconnects.VirtualCrossConnectDeleteResponse;


            public final class Main {
                private Main() {}

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

                    VirtualCrossConnectDeleteResponse virtualCrossConnect = client.virtualCrossConnects().delete("6a09cdc3-8948-47f0-aa62-74ac943d6c58");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            virtual_cross_connect =
            telnyx.virtual_cross_connects.delete("6a09cdc3-8948-47f0-aa62-74ac943d6c58")


            puts(virtual_cross_connect)
        - 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 {
              $virtualCrossConnect = $client->virtualCrossConnects->delete(
                '6a09cdc3-8948-47f0-aa62-74ac943d6c58'
              );

              var_dump($virtualCrossConnect);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx virtual-cross-connects delete \
              --api-key 'My API Key' \
              --id 6a09cdc3-8948-47f0-aa62-74ac943d6c58
components:
  parameters:
    ResourceId:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        format: uuid
        type: string
        example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
  responses:
    VirtualCrossConnectResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/VirtualCrossConnectCombined'
    netapps_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/netapps_Errors'
  schemas:
    VirtualCrossConnectCombined:
      allOf:
        - $ref: '#/components/schemas/VirtualCrossConnectCreate'
        - $ref: '#/components/schemas/VirtualCrossConnectPatch'
        - $ref: '#/components/schemas/RegionOut'
    netapps_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/netapps_Error'
      type: object
    VirtualCrossConnectCreate:
      allOf:
        - $ref: '#/components/schemas/VirtualCrossConnect'
        - $ref: '#/components/schemas/RegionIn'
        - type: object
          title: VirtualCrossConnectCreate
          required:
            - network_id
            - region_code
            - cloud_provider
            - cloud_provider_region
            - bgp_asn
            - primary_cloud_account_id
    VirtualCrossConnectPatch:
      allOf:
        - type: object
          title: VirtualCrossConnectPatch
          properties:
            primary_enabled:
              type: boolean
              description: >-
                Indicates whether the primary circuit is enabled. Setting this
                to `false` will disable the circuit.
              example: true
            primary_routing_announcement:
              description: Whether the primary BGP route is being announced.
              type: boolean
              example: false
            primary_cloud_ip:
              type: string
              description: >-
                The IP address assigned for your side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value can not be patched once the VXC
                has bene provisioned.
              example: 169.254.0.2
            secondary_enabled:
              type: boolean
              description: >-
                Indicates whether the secondary circuit is enabled. Setting this
                to `false` will disable the circuit.
              example: true
            secondary_routing_announcement:
              description: Whether the secondary BGP route is being announced.
              type: boolean
              example: false
            secondary_cloud_ip:
              type: string
              description: >-
                The IP address assigned for your side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value can not be patched once the VXC
                has bene provisioned.
              example: 169.254.0.4
    RegionOut:
      type: object
      properties:
        region_code:
          description: The region interface is deployed to.
          type: string
          example: ashburn-va
        region:
          type: object
          properties:
            code:
              description: Region code of the interface.
              type: string
              example: ashburn-va
            name:
              description: Region name of the interface.
              type: string
              example: Ashburn
            record_type:
              type: string
              description: Identifies the type of the resource.
              readOnly: true
              example: region
    netapps_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
    VirtualCrossConnect:
      allOf:
        - $ref: '#/components/schemas/Record'
        - $ref: '#/components/schemas/Interface'
        - type: object
          title: VirtualCrossConnect
          properties:
            record_type:
              type: string
              description: Identifies the type of the resource.
              readOnly: true
              example: virtual_cross_connect
            cloud_provider:
              type: string
              enum:
                - aws
                - azure
                - gce
              description: >-
                The Virtual Private Cloud with which you would like to establish
                a cross connect.
              example: aws
            cloud_provider_region:
              type: string
              description: >-
                The region where your Virtual Private Cloud hosts are
                located.<br /><br />The available regions can be found using the
                /virtual_cross_connect_regions endpoint.
              example: us-east-1
            bgp_asn:
              type: number
              description: >-
                The Border Gateway Protocol (BGP) Autonomous System Number
                (ASN). If null, value will be assigned by Telnyx.
              example: 1234
            bandwidth_mbps:
              type: number
              description: >-
                The desired throughput in Megabits per Second (Mbps) for your
                Virtual Cross Connect.<br /><br />The available bandwidths can
                be found using the /virtual_cross_connect_regions endpoint.
              example: 50
            primary_enabled:
              type: boolean
              description: >-
                Indicates whether the primary circuit is enabled. Setting this
                to `false` will disable the circuit.
              example: true
              readOnly: true
            primary_cloud_account_id:
              type: string
              description: >-
                The identifier for your Virtual Private Cloud. The number will
                be different based upon your Cloud provider.
              example: '123456789012'
            primary_telnyx_ip:
              type: string
              description: >-
                The IP address assigned to the Telnyx side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value should be null for GCE as Google
                will only inform you of your assigned IP once the connection has
                been accepted.
              example: 169.254.0.1
            primary_cloud_ip:
              type: string
              description: >-
                The IP address assigned for your side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value should be null for GCE as Google
                will only inform you of your assigned IP once the connection has
                been accepted.
              example: 169.254.0.2
            primary_bgp_key:
              type: string
              description: The authentication key for BGP peer configuration.
              example: yFV4wEPtPVPfDUGLWiyQzwga
            secondary_enabled:
              type: boolean
              description: >-
                Indicates whether the secondary circuit is enabled. Setting this
                to `false` will disable the circuit.
              example: true
              readOnly: true
            secondary_cloud_account_id:
              type: string
              description: >-
                The identifier for your Virtual Private Cloud. The number will
                be different based upon your Cloud provider.<br /><br />This
                attribute is only necessary for GCE.
              example: ''
            secondary_telnyx_ip:
              type: string
              description: >-
                The IP address assigned to the Telnyx side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value should be null for GCE as Google
                will only inform you of your assigned IP once the connection has
                been accepted.
              example: 169.254.0.3
            secondary_cloud_ip:
              type: string
              description: >-
                The IP address assigned for your side of the Virtual Cross
                Connect.<br /><br />If none is provided, one will be generated
                for you.<br /><br />This value should be null for GCE as Google
                will only inform you of your assigned IP once the connection has
                been accepted.
              example: 169.254.0.4
            secondary_bgp_key:
              type: string
              description: The authentication key for BGP peer configuration.
              example: ge1lONeK9RcA83uuWaw9DvZy
    RegionIn:
      type: object
      properties:
        region_code:
          description: The region the interface should be deployed to.
          type: string
          example: ashburn-va
    Record:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identifies the resource.
          readOnly: true
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: sample_record_type
        created_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated.
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
    Interface:
      type: object
      properties:
        network_id:
          description: The id of the network associated with the interface.
          type: string
          format: uuid
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        name:
          type: string
          description: A user specified name for the interface.
          example: test interface
        status:
          $ref: '#/components/schemas/InterfaceStatus'
    InterfaceStatus:
      type: string
      enum:
        - created
        - provisioning
        - provisioned
        - deleting
      description: The current status of the interface deployment.
      readOnly: true
      example: provisioned
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````