# Close workspace

`opensend.workspace.close(input)`

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 call with an API key is refused with 403.

## Input

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

## Returns

The call resolves to the answer, already parsed. A call the API refuses throws `OpenSendError` with the code and the message of the answer. [SDK](https://opensend.sh/docs/sdk) lists the errors of the client itself.

- `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

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
}
```
