# Delete a custom view

Source: https://api-docs.magicdoor.com/api-reference/custom-views/delete-custom-view

Deletes one saved column layout. The built-in default view has no stored record and cannot be deleted. Requires the `settings:delete` permission.

`DELETE https://services.magicdoor.com/settings/company-portal/settings/custom-views/{type}/{key}`

**Authentication:** bearer token in the `Authorization` header, as `Bearer <token>`.

## Path parameters

- `type` (enum<string>, required) — Which list screen the view belongs to. Matched case-insensitively, and echoed back in `viewType` exactly as spelled here. One of: `Units`, `Properties`, `Leases`, `LeasesWithBalanceDue`, `DraftLeases`, `ExpiringLeases`, `PastLeases`, `LeasesWithMoveOutRequests`, `LeaseRentalApplications`, `PropertyApplications`, `AccountingBills`, `MaintenanceRequests`, `WorkOrders`, `WorkOrderBills`, `PropertyManagers`, `Owners`, `Tenants`. Example: `Leases`.
- `key` (string, required) — The view's key — its name lowercased with every run of non-alphanumeric characters turned into a hyphen. A view's key changes when its name changes. Example: `delinquent-leases`.

## Example request

```bash
curl --request DELETE \
  --url 'https://services.magicdoor.com/settings/company-portal/settings/custom-views/Leases/delinquent-leases' \
  --header 'Authorization: Bearer <token>'
```

## Responses

### 200 — The view was deleted. The response has no body.

### 401 — The access token is missing, expired, or invalid.

### 403 — The caller does not hold the `settings:delete` permission.

### 404 — The company has no saved view with that key for that type.
