# Update database settings

`PATCH /v1/databases/{id}`

Sets the filter applied to every view and the row templates.

Scope: `docs:write`. Undoable.

## Request

```bash
curl -X PATCH "https://api.lydie.co/v1/databases/01JCQ3V5MZ8G4ZK2X7T9R6N1PB" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Path parameters

- `id` (ULID, required)

## Body

- `filter` (FilterNode, optional, nullable)
- `templateIds` (ULID[], optional)

## Response

- `id` (ULID, required)
- `workspaceId` (string, required): (1–64 chars)
- `config` (DatabaseConfig, required)
  - `filter` (FilterNode, required, nullable): Default: `null`.
  - `templateIds` (ULID[], required): Default: `[]`.
  - `extra` (object, required): Default: `{}`.
- `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",
  "config": {
    "filter": null,
    "templateIds": [],
    "extra": {}
  },
  "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.
