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

# Delete a connection no source uses

> Destroy a saved connection and its token. Refused with 409, naming the sources, while any source still uses it.

Deletes a connection and destroys its token; it cannot be recovered. **While any knowledge source uses the connection, the answer is `409` and nothing changes**: the message names up to three of those sources. Delete them first, then the connection. You need the owner or admin role (`credential.manage`).

**connection\_id** `string` *required*

The connection's ID (UUID).

## Response

Returns `204` with no body.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --request DELETE "$MITHUNAI_URL/mithunai/api/v1/connections/$CONNECTION_ID" \
  --header "Authorization: Bearer $MITHUNAI_API_KEY"
```

```json 409 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "code": "conflict",
  "message": "This connection is still used by 1 knowledge source: Engineering wiki. Remove those first, then delete it."
}
```

```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "code": "not_found", "message": "The connection was not found." }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.