---
title: "Remove a sub-account. With inboxes and without delete_inboxes=true, the call is 409 workspace_not_empty and deletes nothing. delete_inboxes=true deletes direct inboxes (messages, attachments, owners, and tasks), then the workspace API keys, OAuth tokens, webhooks, domains, and the child account. An approval inbox returns HTTP 409 owner_required and deletes nothing until its owner confirms. The child key then returns 401. Parent plan usage no longer counts that sub-account. Another parent's workspace is 404 workspace_not_found. A sub-account key is 403 permission_denied."
method: DELETE
path: "/api/v1/workspaces/{id}"
tags: ["Workspaces"]
---

# Remove a sub-account. With inboxes and without delete_inboxes=true, the call is 409 workspace_not_empty and deletes nothing. delete_inboxes=true deletes direct inboxes (messages, attachments, owners, and tasks), then the workspace API keys, OAuth tokens, webhooks, domains, and the child account. An approval inbox returns HTTP 409 owner_required and deletes nothing until its owner confirms. The child key then returns 401. Parent plan usage no longer counts that sub-account. Another parent's workspace is 404 workspace_not_found. A sub-account key is 403 permission_denied.

`DELETE /api/v1/workspaces/{id}`

## Request

- Base URL: `https://cooperemail.com`
- URL: `https://cooperemail.com/api/v1/workspaces/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Query parameters

- `delete_inboxes` boolean

## Response `200`

The workspace was deleted

- object
  - `object` 'workspace'
  - `id` string, required
  - `deleted` unknown, required
  - `inboxes_deleted` integer, required

---

[API](https://skmtc.dev/cooperemail/apis/cooper-email-api.md) · [All operations](https://skmtc.dev/cooperemail/apis/cooper-email-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cooperemail/apis/cooper-email-api/revisions/6d800a7b3e33?raw)
