# Delete a workspace

> **DELETE** `https://api.us.nylas.com/v3/workspaces/{workspace_id}`

Source: https://developer.nylas.com/docs/reference/api/workspaces/delete-workspace/

Deletes the specified workspace. You can't delete the application's default workspace. The workspace's grants keep working and move to the default workspace, or become unassigned if there isn't one.

To learn what gets removed and when, see [Deleting resources and data](/docs/dev-guide/platform/deleting-resources/).

**Authentication:** NYLAS_API_KEY

## Parameters

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `workspace_id` | string | Yes | ID of the workspace to access. |

## Responses

### 200 - Success. Workspace deleted.



### 400 - Error: Bad request. The workspace is the application's default workspace, which can't be deleted.

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

### 401 - Error: Not authenticated

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

### 404 - Error: Not found

- `request_id` (string) **(required)** - ID of the request
- `error` (object) **(required)** - Error object
  - `type` (string) - Type of error
  - `message` (string) - Informative error message
  - `provider_error` (object) - (OPTIONAL) informative error message from provider's side

## Code samples

### cURL

```bash
curl --request DELETE \
  --url "https://api.us.nylas.com/v3/workspaces/<WORKSPACE_ID>" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json'
```
