---
title: "Delete a connection"
method: DELETE
path: "/api/v1/connections/{connection_id}"
tags: ["App Connections"]
---

# Delete a connection

`DELETE /api/v1/connections/{connection_id}`

## Request

- Base URL: `https://$SCALEKIT_ENVIRONMENT_URL`
- URL: `https://$SCALEKIT_ENVIRONMENT_URL/api/v1/connections/{connection_id}`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://$SCALEKIT_ENVIRONMENT_URL/oauth/token`
- TypeScript: <https://skmtc.dev/scalekit/apis/scalekit-api-reference/docs/api/v1/connections/:connection_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes a connection. It fails while connected accounts or Virtual MCP servers still use the connection. Delete its connected accounts first with [Delete a connected account](/agentkit/reference/connected-accounts/delete-a-connected-account/), and remove it from each server with [Update a Virtual MCP server](/agentkit/reference/virtual-mcp-servers/update-a-virtual-mcp-server/).

## Path parameters

- `connection_id` string, required

## Response `200`

The connection was deleted.

## Other responses

- `400`: Invalid request - connected accounts or Virtual MCP servers still use the connection.
- `401`: Authentication required - missing or invalid access token
- `404`: Not found - no connection with this ID. Error code `RESOURCE_NOT_FOUND`.

## Changes

- **2026-10-30** `f6c5d8349d4a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scalekit/apis/scalekit-api-reference/changes/api/v1/connections/:connection_id/delete.md)

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) - [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/f47f1022d844?raw)
