# `deleteEnterpriseConnection()`

Deletes the given enterprise connection.

Returns the deleted [`EnterpriseConnection`](/content/docs/reference/backend/types/backend-enterprise-connection/index.html) object.

```
function deleteEnterpriseConnection(enterpriseConnectionId: string): Promise<EnterpriseConnection>
```

## Parameters

- Name: `enterpriseConnectionId`  
  Type: `string`  
  Description: The ID of the enterprise connection to delete.

## Usage

Note

Using `clerkClient` varies based on the SDK you're using. Refer to the [overview](/content/docs/reference/backend/overview/index.html) for usage details, including guidance on [how to access the `userId` and other properties](/content/docs/reference/backend/overview#example-get-the-user-id-and-other-properties/index.html).

```
const response = await clerkClient.enterpriseConnections.deleteEnterpriseConnection('ec_123')
```

## Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint `DELETE/enterprise_connections/{enterprise_connection_id}`. See the [BAPI reference⁠](/content/docs/reference/backend-api/tag/enterprise-connections/DELETE/enterprise_connections/%7Benterprise_connection_id%7D/index.html) for more information.
