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

# Deletes an External Connection

> Permanently deletes an External Connection. Deletion may be prevented if the application is in use by phone numbers, is active, or if it is an Operator Connect connection. To remove an Operator Connect integration please contact Telnyx support.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml delete /external_connections/{id}
openapi: 3.1.0
info:
  title: Telnyx External Connects API
  version: 2.0.0
  description: API for External connects.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /external_connections/{id}:
    delete:
      tags:
        - External Connections
      summary: Deletes an External Connection
      description: >-
        Permanently deletes an External Connection. Deletion may be prevented if
        the application is in use by phone numbers, is active, or if it is an
        Operator Connect connection. To remove an Operator Connect integration
        please contact Telnyx support.
      operationId: DeleteExternalConnection
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
      responses:
        '200':
          $ref: '#/components/responses/ExternalConnectionResponse'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
        '422':
          description: Bad request
      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 externalConnection = await
            client.externalConnections.delete('1293384261075731499');


            console.log(externalConnection.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
            )
            external_connection = client.external_connections.delete(
                "1293384261075731499",
            )
            print(external_connection.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\texternalConnection, err := client.ExternalConnections.Delete(context.TODO(), \"1293384261075731499\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", externalConnection.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.externalconnections.ExternalConnectionDeleteParams;

            import
            com.telnyx.sdk.models.externalconnections.ExternalConnectionDeleteResponse;


            public final class Main {
                private Main() {}

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

                    ExternalConnectionDeleteResponse externalConnection = client.externalConnections().delete("1293384261075731499");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            external_connection =
            telnyx.external_connections.delete("1293384261075731499")


            puts(external_connection)
        - 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 {
              $externalConnection = $client->externalConnections->delete(
                '1293384261075731499'
              );

              var_dump($externalConnection);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx external-connections delete \
              --api-key 'My API Key' \
              --id 1293384261075731499
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
  responses:
    ExternalConnectionResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: External Connection Response
            properties:
              data:
                $ref: '#/components/schemas/ExternalConnection'
  schemas:
    ExternalConnection:
      type: object
      title: External Connection
      properties:
        id:
          $ref: '#/components/schemas/external-voice-integrations_IntId'
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: external_connection
        active:
          $ref: '#/components/schemas/ConnectionActive'
        credential_active:
          $ref: '#/components/schemas/CredentialActive'
        external_sip_connection:
          $ref: '#/components/schemas/ExternalSipConnection'
        tags:
          type: array
          items:
            type: string
          description: Tags associated with the connection.
          example:
            - tag1
            - tag2
        webhook_event_url:
          type: string
          format: uri
          description: >-
            The URL where webhooks related to this connection will be sent. Must
            include a scheme, such as 'https'.
          example: https://example.com
        webhook_event_failover_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            The failover URL where webhooks related to this connection will be
            sent if sending to the primary URL fails. Must include a scheme,
            such as 'https'.
          example: https://failover.example.com
          default: ''
        webhook_api_version:
          type: string
          description: Determines which webhook format will be used, Telnyx API v1 or v2.
          enum:
            - '1'
            - '2'
          example: '1'
          default: '1'
        webhook_timeout_secs:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 30
          description: Specifies how many seconds to wait before timing out a webhook.
          example: 25
          default: null
        inbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent inbound calls
                to phone numbers associated with this connection.
              default: null
              example: 10
        outbound:
          type: object
          properties:
            channel_limit:
              type: integer
              description: >-
                When set, this will limit the number of concurrent outbound
                calls to phone numbers associated with this connection.
              default: null
              example: 10
            outbound_voice_profile_id:
              $ref: >-
                #/components/schemas/external-voice-integrations_OutboundVoiceProfileId
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2018-02-02T22:25:27.521Z'
      example:
        id: '1930241863466354012'
        record_type: external_connection
        external_sip_connection: zoom
        credential_active: false
        active: false
        created_at: '2022-06-29T19:23:59Z'
        updated_at: '2022-06-29T19:39:47Z'
        outbound:
          outbound_voice_profile_id: '1911630617284445511'
    external-voice-integrations_IntId:
      title: Int ID
      type: string
      description: Uniquely identifies the resource.
      example: '1293384261075731499'
      x-format: int64
    ConnectionActive:
      title: Connection Active
      type: boolean
      description: Specifies whether the connection can be used.
      default: true
      example: false
    CredentialActive:
      title: Credential Active
      description: If the credential associated with this service is active.
      type: boolean
      default: false
      example: true
    ExternalSipConnection:
      title: External SIP Connection
      type: string
      description: The service that will be consuming this connection.
      enum:
        - zoom
        - operator_connect
      default: zoom
      example: zoom
    external-voice-integrations_OutboundVoiceProfileId:
      title: Outbound Voice Profile ID
      type: string
      description: Identifies the associated outbound voice profile.
      example: '1293384261075731499'
      x-format: int64
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````