---
title: "deleteOrg"
---

> 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.

# deleteOrg

Path: Forge API › orgs

`DELETE /orgs/{org_id}`

Delete the org. It is then not found. A paid org's subscription is cancelled at once, without a refund. Takes delete on the org.

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = '<base-url>/orgs/<org_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>"

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

### 401

InvalidCredentials

#### Example

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

- `_tag` (`deleteOrg.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

OrgNotFound

#### Example

```json
{
  "_tag": "OrgNotFound"
}
```

- `_tag` (`deleteOrg.response.404._tag`; string, required)
  - one of `"OrgNotFound"`

### 429

RateLimited

#### Example

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

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

### 500

OrgFailure | ControlPlaneFailure | RepoFailure

#### Example

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

Every option has:

- `reason` (`<option>.reason`; string, required)

Any of the following, each adding:

- `OrgFailureEncoded`
  - `_tag` (`OrgFailureEncoded._tag`; string, required)
    - one of `"OrgFailure"`
- `ControlPlaneFailureEncoded`
  - `_tag` (`ControlPlaneFailureEncoded._tag`; string, required)
    - one of `"ControlPlaneFailure"`
- `RepoFailureEncoded`
  - `_tag` (`RepoFailureEncoded._tag`; string, required)
    - one of `"RepoFailure"`

### 502

StripeFailure

#### Example

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

- `_tag` (`deleteOrg.response.502._tag`; string, required)
  - one of `"StripeFailure"`
- `reason` (`deleteOrg.response.502.reason`; string, required)

### 503

BillingNotConfigured | SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "BillingNotConfigured"
}
```

Any of the following:

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


Source: https://buildrforge.com/docs/api/orgs/delete/index.md
