Upsert one UI preference
const url = 'https://example.com/api/v1/ui-preferences';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"section_key":"example","mode":"basic","expected_updated_at":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/ui-preferences \ --header 'Content-Type: application/json' \ --data '{ "section_key": "example", "mode": "basic", "expected_updated_at": "2026-04-15T12:00:00Z" }'Creates or updates the stored disclosure mode for a section key.
Payloads include optional concurrency token expected_updated_at.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Canonical progressive disclosure section key
Disclosure visibility mode for the section
Optional optimistic concurrency token
Responses
Section titled “Responses”UI preference persisted
object
Canonical progressive disclosure section key
Disclosure visibility mode for the section
Example
{ "mode": "basic"}Validation error
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Authentication required
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Concurrency conflict
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Preference updates are being rate-limited
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Failed to save preference
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}