Kodwen docs
API referenceGateway

Settings

Account-level settings shared by every device: read with defaults, deep-merge updates, optimistic versioning.

One settings object per account (per user, not per key): what you change on the phone is what the watch, the desktop and the hub read. GET /v1/settings always answers the full object with defaults applied; version is 0 and updatedAt is null until the first write.

PATCH /v1/settings deep-merges a partial object into what is stored and validates the result strictly — an unknown key or a bad value is a 400. Send the version you last read to make the write conditional: when someone else changed the settings meanwhile you get 409 version_conflict with current (the GET shape) and nothing is written. A database outage is a 503 settings_unavailable, never defaults presented as your settings.

KeyValuesDefault
transcripts.waveformring, bars, blob, dot, offring
transcripts.hapticstrue / falsetrue
transcripts.liveTexttrue / falsetrue
transcripts.targetauto, phone, watchauto
transcripts.languageBCP-47 tag (at most 16 characters) or null for auto-detectnull
appearance.colorThemeTheme id: system (built-in dark/light following mode), auto (the lightTheme/darkTheme pair, switched by the OS), dynamic (Android Material You; system elsewhere), builtin.*, catalog.* (from GET /v1/themes), user.* (device-local)system
appearance.lightTheme / appearance.darkThemeTheme ids used while colorTheme is autobuiltin.light / builtin.dark
appearance.modesystem, light, darksystem
appearance.accentpetrol, gold, vermilion, indigo, blue, teal, green, amber, rosepetrol
appearance.skinassistant (chat-first), developer (sessions + panels), focus (chat only)assistant
appearance.amoledtrue / false — pure black surfaces in dark themesfalse
appearance.fontbrand (Manrope), system (the OS font), legible (the OS font with wider letter spacing; no font is downloaded — desktop uses Atkinson Hyperlegible only where it is installed)brand

appearance is the look & feel synced across the desktop app, the phone and the hub: change the accent on one device and the others follow on their next read. A theme id a client does not know (a user.* theme imported on another device, dynamic outside Android) is not an error — that client keeps its own default. Wear OS and Google TV keep their dark brand theme. The hub uses mode and accent; surface, density and reduced motion stay hub-only.

The same operations are in the SDKs (client.settings.get() / client.settings.update(partial, { version }) in TypeScript, client.settings.update(partial, version=…) in Python), the CLI (codaid settings get, codaid settings set transcripts.waveform=bars, codaid settings set appearance.accent=teal appearance.mode=dark) and the MCP server (settings_get, settings_update).

GET
/v1/settings

Authorization

bearerAuth
headerAuthorizationBearer <codai_…>

A Kodwen API key (codai_ prefix). Ephemeral tokens from POST /v1/tokens are accepted only by the media surfaces matching their scope (/v1/realtime, /v1/audio/*, /v1/embeddings).

Header Parameters

x-request-id?string

Client correlation id; echoed back as x-codai-trace-id and persisted on the usage row.

Lengthlength <= 128

Response Body

The settings with defaults applied.

application/json
  1. response
settings*
version*integer

Optimistic-concurrency counter; 0 = never written.

Range0 <= value
updatedAt*|

Time of the last write; null when never written.

Formatdate-time
Example Request
curl -X GET 'https://ai.codai.ro/v1/settings'
Example Response
{  "settings": {    "transcripts": {      "waveform": "ring",      "haptics": true,      "liveText": true,      "target": "auto",      "language": null    },    "appearance": {      "colorTheme": "system",      "lightTheme": "builtin.light",      "darkTheme": "builtin.dark",      "mode": "system",      "accent": "petrol",      "skin": "assistant",      "amoled": false,      "font": "brand"    }  },  "version": 0,  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/v1/settings

Authorization

bearerAuth
headerAuthorizationBearer <codai_…>

A Kodwen API key (codai_ prefix). Ephemeral tokens from POST /v1/tokens are accepted only by the media surfaces matching their scope (/v1/realtime, /v1/audio/*, /v1/embeddings).

Header Parameters

x-request-id?string

Client correlation id; echoed back as x-codai-trace-id and persisted on the usage row.

Lengthlength <= 128

Request Body

A deep partial of the settings plus an optional expected version.

application/json
  1. body
settings*

Deep partial of UserSettings; unknown keys are rejected.

version?integer

Expected current version; a mismatch is a 409.

Range0 <= value

Response Body

The stored settings with defaults applied (same shape as GET).

application/json
  1. response
settings*
version*integer

Optimistic-concurrency counter; 0 = never written.

Range0 <= value
updatedAt*|

Time of the last write; null when never written.

Formatdate-time
Example Request
curl -X PATCH 'https://ai.codai.ro/v1/settings' \  -H 'Content-Type: application/json' \  -d '{  "settings": {}}'
Example Response
{  "settings": {    "transcripts": {      "waveform": "ring",      "haptics": true,      "liveText": true,      "target": "auto",      "language": null    },    "appearance": {      "colorTheme": "system",      "lightTheme": "builtin.light",      "darkTheme": "builtin.dark",      "mode": "system",      "accent": "petrol",      "skin": "assistant",      "amoled": false,      "font": "brand"    }  },  "version": 0,  "updatedAt": "2019-08-24T14:15:22Z"}