# Delete a database view

`DELETE /v1/database-views/{id}`

Scope: `docs:write`. Undoable.

## Request

```bash
curl -X DELETE "https://api.lydie.co/v1/database-views/01JCQ3V5MZ8G4ZK2X7T9R6N1PB" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

- `id` (ULID, required)

## Response

- `id` (ULID, required)
- `workspaceId` (string, required): (1–64 chars)
- `databaseId` (ULID, required)
- `name` (string, required): (1–200 chars)
- `type` (string, required): One of: `table`, `board`, `list`, `calendar`, `gallery`.
- `config` (ViewConfig, required)
  - `filter` (FilterNode, required, nullable): Default: `null`.
  - `sorts` (object[], required): Default: `[]`.
    - `propertyId` (ULID, required)
    - `direction` (string, required): One of: `asc`, `desc`. Default: `"asc"`.
  - `groupBy` (GroupBy, required, nullable): Default: `null`.
    - `propertyId` (ULID, required)
    - `direction` (string, required): One of: `asc`, `desc`. Default: `"asc"`.
    - `order` (string[], optional)
    - `hideEmpty` (boolean, optional): Hide groups with no rows (board columns).
    - `dateBucket` (string, optional): Date grouping; default month. One of: `day`, `week`, `month`, `year`.
    - `collapsed` (string[], optional)
  - `subGroupBy` (GroupBy, required, nullable): Board swimlanes. Default: `null`.
    - `propertyId` (ULID, required)
    - `direction` (string, required): One of: `asc`, `desc`. Default: `"asc"`.
    - `order` (string[], optional)
    - `hideEmpty` (boolean, optional): Hide groups with no rows (board columns).
    - `dateBucket` (string, optional): Date grouping; default month. One of: `day`, `week`, `month`, `year`.
    - `collapsed` (string[], optional)
  - `columns` (ViewColumn[], required): Default: `[]`.
    - `propertyId` (ULID, required)
    - `visible` (boolean, required): Default: `true`.
    - `width` (integer, optional): (20–2000)
  - `limit` (integer, required, nullable): Default: `null`. (≥ 1)
  - `summaries` (object, required): propertyId → summary name Default: `{}`.
  - `layout` (ViewLayout, required): Default: `{}`.
    - `rowHeight` (string, optional): table One of: `short`, `medium`, `tall`, `extra`.
    - `wrapCells` (boolean, optional): table
    - `cardSize` (integer, optional): board, gallery: px (50–1000)
    - `cover` (object, optional, nullable): board, gallery: the card image
    - `coverFit` (string, optional): One of: `cover`, `contain`.
    - `coverAspectRatio` (number, optional): (0.1–10)
    - `markers` (string, optional): list One of: `bullet`, `number`, `none`.
    - `calendarPropertyId` (ULID, optional): calendar: the date property placing rows
    - `calendarMode` (string, optional): One of: `month`, `week`.
    - `showWeekends` (boolean, optional)
    - `colorColumns` (boolean, optional): board
  - `extra` (object, required): Default: `{}`.
- `sortKey` (string, required): (1–256 chars)
- `createdAt` (timestamp, required)
- `updatedAt` (timestamp, required)
- `deletedAt` (timestamp, required, nullable)
- `createdBy` (string, optional, nullable): (≥ 1 chars)
- `updatedBy` (string, optional, nullable): (≥ 1 chars)

```json
{
  "id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
  "databaseId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "name": "Notes",
  "type": "table",
  "config": {
    "filter": null,
    "sorts": [],
    "groupBy": null,
    "subGroupBy": null,
    "columns": [],
    "limit": null,
    "summaries": {},
    "layout": {},
    "extra": {}
  },
  "sortKey": "a0",
  "createdAt": "2026-11-12T09:30:00.000Z",
  "updatedAt": "2026-11-12T09:30:00.000Z",
  "deletedAt": null,
  "createdBy": null,
  "updatedBy": null
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
