# Close workspace

`DELETE /v1/workspace`

Removes the workspace with every domain, key, email, contact and member in it. Only its owner can, signed in, by sending its name. It cannot be undone.

Needs the scope: `workspace:write`

This method answers a person who is signed in to the dashboard. A request with an API key is refused with 403, so it cannot be tried from this page.

## Query parameters

- `confirm` (string, required): The name of the workspace, exactly as it is written. Up to 120 characters.

## Returns

- `object` (string): What kind of thing was removed. One of: `list`, `email`, `broadcast`, `audience`, `template`, `template_version`, `template_starter`, `automation`, `metrics`, `domain`, `api_key`, `webhook`, `log`, `workspace`, `member`, `method`, `account`, `inbound_email`, `webhook_delivery`, `contact`, `plan`, `checkout`, `invoice`, `ask_answer`, `suppression`, `chat`, `automation_run`, `event`, `event_receipt`, `import`, `import_inventory`, `topic`, `contact_property`, `image`, `server`.
- `id` (string): The id of what was removed.
- `deleted` (true): Always `true`: it is gone for good.

## Example

cURL:

```bash
curl -X DELETE "$OPENSEND_API_URL/v1/workspace?confirm=Acme+Mail" \
  -H "Authorization: Bearer $OPENSEND_API_KEY"
```

TypeScript:

```ts
await opensend.workspace.close({
  confirm: 'Acme Mail',
})
```

CLI:

```bash
opensend workspace close --confirm 'Acme Mail'
```

Answer:

```json
{
  "object": "workspace",
  "id": "ws_demo",
  "deleted": true
}
```
