---
title: "Detach an organization"
method: DELETE
path: "/api/public/billing-accounts/{billingAccountId}/organizations/{orgId}"
tags: ["Billing accounts"]
---

# Detach an organization

`DELETE /api/public/billing-accounts/{billingAccountId}/organizations/{orgId}`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/billing-accounts/{billingAccountId}/organizations/{orgId}`
- Auth: HTTP bearer

Detaches an organization from the billing account. The organization reverts to the FREE plan. Requires admin access to either the account's owner organization or the organization being detached.

## Path parameters

- `billingAccountId` string, required: Billing account ID
- `orgId` string, required: Organization ID

## Response `200`

Organization detached successfully

- object
  - `data` PublicBillingAccountOrganizationDetached, required
    - `id` string, required: Organization ID
    - `billingAccountId` string, required: Billing account ID
    - `detached` true, required: Whether the organization is detached

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Billing account or organization not found, not attached, or no admin access
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

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