---
title: "deleteOrgConnection"
---

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

# deleteOrgConnection

Path: Forge API › connections

`DELETE /orgs/{org_id}/connections/{connection_id}`

Delete a connection you connected, or, as an org owner, an org connection. A connection that fills a requirement can't be deleted until it is unbound.

## Path parameters

- `org_id` (`deleteOrgConnection.path.org_id`; string, required)
  - pattern: `^org_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `connection_id` (`deleteOrgConnection.path.connection_id`; string, required)
  - pattern: `^connection_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url '<base-url>/orgs/<org_id>/connections/<connection_id>'
```

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_id>/connections/<connection_id>';
const options = {method: 'DELETE'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/orgs/<org_id>/connections/<connection_id>"

response = requests.delete(url)

print(response.text)
```

## Responses

### 204

<No Content>

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`deleteOrgConnection.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`deleteOrgConnection.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`deleteOrgConnection.response.400.issues`; array of object, required)
  - `path` (`deleteOrgConnection.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`deleteOrgConnection.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`deleteOrgConnection.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

ConnectionNotFound | OrgNotFound

#### Example

```json
{
  "_tag": "ConnectionNotFound",
  "connection_id": "string"
}
```

Any of the following:

- `ConnectionNotFoundEncoded`
  - `_tag` (`ConnectionNotFoundEncoded._tag`; string, required)
    - one of `"ConnectionNotFound"`
  - `connection_id` (`ConnectionNotFoundEncoded.connection_id`; string, required)
    - pattern: `^connection_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `OrgNotFoundEncoded`
  - `_tag` (`OrgNotFoundEncoded._tag`; string, required)
    - one of `"OrgNotFound"`

### 409

ConnectionBound

#### Example

```json
{
  "_tag": "ConnectionBound",
  "connection_id": "string",
  "repo_id": "string",
  "extension_name": "string",
  "requirement": "string",
  "message": "string"
}
```

- `_tag` (`deleteOrgConnection.response.409._tag`; string, required)
  - one of `"ConnectionBound"`
- `connection_id` (`deleteOrgConnection.response.409.connection_id`; string, required)
  - pattern: `^connection_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `repo_id` (`deleteOrgConnection.response.409.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `extension_name` (`deleteOrgConnection.response.409.extension_name`; string, required)
- `requirement` (`deleteOrgConnection.response.409.requirement`; string, required)
- `message` (`deleteOrgConnection.response.409.message`; string, required)

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`deleteOrgConnection.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

OrgFailure

#### Example

```json
{
  "_tag": "OrgFailure",
  "reason": "string"
}
```

- `_tag` (`deleteOrgConnection.response.500._tag`; string, required)
  - one of `"OrgFailure"`
- `reason` (`deleteOrgConnection.response.500.reason`; string, required)

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/delete-org-connection/index.md
