---
title: "Delete the workspace"
description: "Deletes the workspace the key or the app belongs to, with everything in it, and cancels its plan."
url: "https://openemail.uk/docs/api/workspaces/delete"
area: "API"
category: "Your account"
---

# Delete the workspace

Deletes the workspace the key or the app belongs to, with everything in it, and cancels its plan.

`DELETE /workspaces/{id}`

## DELETE /workspaces/{id}

Deletes the workspace the key or the app belongs to, with everything in it, and cancels its plan.

## Example

Needs `account:write`. `confirm` is the name of the workspace, as the app asks the person to type it before deleting. Letter case and the spaces around it do not matter.

**curl**

```
curl -X DELETE "$OE/workspaces/6d2f8a41-9c3e-4b7a-8e15-2f0c9d4b7a63?confirm=Acme%20Support" -H "$AUTH"
```

**Response**

```
{
  "object": "workspace",
  "id": "6d2f8a41-9c3e-4b7a-8e15-2f0c9d4b7a63",
  "deleted": true,
  "activeWorkspaceId": "10417196-e324-4283-af98-66ec62167c47"
}
```

> It is for good: the domains, addresses, mail, members and keys of the workspace go with it, and the key that made the call stops working.

> Only the id of the workspace the key or the app belongs to is accepted, and any other is a 404. An access token acting for a member is refused with 403 `owner_only`, and a key or an app limited to particular addresses or domains with 422 `capability_unsupported`.

> The first workspace an account made cannot be deleted (409 `first_workspace`), so delete the whole account in the app instead. One with a domain being moved into or out of it is a 409 `domain_moving`.

> A wrong or missing `confirm` is a 422 `invalid_parameter` on `confirm`, and the message names the workspace.

> An OAuth access token needs a verification code for this call. Until the app has verified one in the last 60 minutes, the call answers `403` `step_up_required` and changes nothing. An API key is never asked. The Authentication page shows how to ask for a code and verify it.

## Reference

- [`DELETE /workspaces/{id}`](https://openemail.uk/docs/api/reference/workspaces#delete-workspaces-id): full reference
