# Settings

> Read and update web UI settings shared by every browser.

---

LLMS index: [llms.txt](/llms.txt)

---

Client settings live in the server's SQLite database, so every browser
pointing at the same Pigeon instance shares the same language, auto-sync
interval and reader preferences. A new database is created and seeded with
the defaults on first start.

## The settings object

```json
{
  "lang": "en",
  "refreshIntervalMs": 60000,
  "imagesBanner": false,
  "groupBySender": false
}
```

| Field | Type | Description |
| --- | --- | --- |
| `lang` | string | Web UI language: `en` or `zh`. Default `en`. |
| `refreshIntervalMs` | integer | How often the web UI auto-syncs mailboxes while the page is open. `0` turns auto-sync off. Default `60000` (one minute). |
| `imagesBanner` | boolean | Automatically load remote images when a message opens. When off, remote images are blocked and a banner with a “Show images” button appears above the message body. Default `false`. |
| `groupBySender` | boolean | Collapse the message list into one row per sender. Clicking a row shows that sender's messages in the reader pane, and clicking one expands it in place. Default `false`. |

Allowed `refreshIntervalMs` values: `0` (off), `30000`, `60000`, `120000`,
`300000`, `900000`.

## Get settings

`GET /api/settings`

```bash
curl http://127.0.0.1:8787/api/settings
```

## Update settings

`PUT /api/settings` — send any subset of the fields; omitted ones keep their
current values. Returns the full settings object.

```bash
curl -X PUT http://127.0.0.1:8787/api/settings \
  -H 'Content-Type: application/json' \
  -d '{"lang": "zh", "refreshIntervalMs": 300000}'
```

An invalid language or an unsupported interval returns `400 Bad Request`.

---

Backlinks:

- [REST API Basics](/docs/api/)
