---
title: "chat.view-pref@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/chat.view-pref"
updated: null
---

# chat.view-pref@1 · OpenVibe.Services

HTML: [chat.view-pref@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/chat.view-pref)

# ChatViewPreference `chat.view-pref@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: chat
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-001](/docs/adr/ADR-001)
- Schema: [`https://openvibe.network/contracts/chat/view-pref.v1.json`](/docs/contracts/chat.view-pref.json)

chat.view-pref@1: saved rendering choice for a conversation, or the default for a conversation kind. Conversation choices override the matching default.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `view` | enum | yes |  | - `one of "bubbles", "room"` |
| `kind` | enum |  |  | - `one of "one_to_one", "ai", "group", "channel"` |
| `conversation_id` | string \| integer |  | Omit for a kind default; otherwise the preference is scoped to this conversation. |  |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: direct-message

~~~~
{
  "view": "bubbles",
  "kind": "one_to_one",
  "conversation_id": 123
}
~~~~

Rejected: unknown-view

~~~~
{
  "view": "cards",
  "kind": "one_to_one",
  "conversation_id": 123
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('chat.view-pref@1', value);   // { valid, errors: [{ path, message }] }
~~~~
