> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Connection

> Deletes an existing connection from a project. The connection is permanently removed and cannot be recovered.

## Endpoint

```
DELETE /apiops/projects/{projectName}/connections/{connectionName}/
```

## Authentication

Requires a Personal API Access Token.

### Header

```
Authorization: Bearer YOUR_TOKEN
```

## Request

### Headers

| Header        | Value          | Required |
| ------------- | -------------- | -------- |
| Authorization | Bearer {token} | Yes      |

### Path Parameters

| Parameter      | Type   | Required | Description                  |
| -------------- | ------ | -------- | ---------------------------- |
| projectName    | string | Yes      | Project name                 |
| connectionName | string | Yes      | Connection name (must exist) |

### Query Parameters

None

### Request Body

This endpoint does not require a request body.

## Response

### Success Response (200 OK)

```json theme={null}
{
  "success": true,
  "deploymentResult": {
    "success": true
  }
}
```

#### Response Fields

| Field                    | Type    | Description                             |
| ------------------------ | ------- | --------------------------------------- |
| success                  | boolean | Indicates if the request was successful |
| deploymentResult         | object  | Deployment result                       |
| deploymentResult.success | boolean | Deployment success                      |

### Error Response (400 Bad Request)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Connection (name: my-email-connection) was not found!"
}
```

#### Common Causes

* Connection name does not exist
* Connection name is empty

### Error Response (401 Unauthorized)

```json theme={null}
{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}
```

### Error Response (404 Not Found)

```json theme={null}
{
  "error": "not_found",
  "error_description": "Project 'MyProject' not found"
}
```

## cURL Example

```bash theme={null}
curl -X DELETE \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-email-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Full JSON Body Example

This endpoint does not require a request body.

## Permissions

* User must have **`CONNECTIONS` + `MANAGE`** permission in the project

## Notes and Warnings

* **Permanent Deletion**: Connection deletion is permanent and cannot be undone
* **Dependencies**: Ensure no policies or other components are using the connection before deletion
* **Case Sensitivity**: Connection names are case-insensitive
* **Deployment**: Connection is automatically removed from workers if it was deployed
* **References**: If other connections reference this connection, those references may break

## Related Documentation

* [List Connections](/api-reference/connections/crud/list-connections) - List all connections
* [Get Connection](/api-reference/connections/crud/get-connection) - Get connection details
* [Create Connection](/api-reference/connections/crud/create-connection) - Create a new connection
* [Update Connection](/api-reference/connections/crud/update-connection) - Update a connection
