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

# Delete corporation

> Delete a corporation from your organization

Deletes a corporation from your organization. This action cannot be undone.

<Warning>
  Deleting a corporation will remove all associated data. Ensure you have backed up any necessary information before proceeding.
</Warning>

<ParamField path="id" type="string" required>
  Unique identifier of the corporation to delete.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://transaction-tax.api.in.commenda.io/api/v1/corporations/corp_123abc' \
    --header 'Authorization: Bearer <token>'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://transaction-tax.api.in.commenda.io/api/v1/corporations/corp_123abc', {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer <token>'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
    'https://transaction-tax.api.in.commenda.io/api/v1/corporations/corp_123abc',
    headers={'Authorization': 'Bearer <token>'}
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Corporation deleted successfully.",
    "data": {
      "id": "corp_123abc",
      "deleted": true
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "CORPORATION_NOT_FOUND",
      "message": "Corporation with the specified ID was not found"
    }
  }
  ```

  ```json 409 theme={null}
  {
    "error": {
      "code": "CORPORATION_HAS_DEPENDENCIES",
      "message": "Cannot delete corporation with active transactions or registrations"
    }
  }
  ```
</ResponseExample>
