A boolean is a primitive value with two logical states: true and false. Use it for flags and straightforward yes-or-no questions, such as whether a chat room is archived or allows chatbots. section 5.2
Choose boolean fields deliberately:
- Prefer positive names such as allowChatbots or enableFeature, so true expresses the permitted or enabled condition and avoids double negatives. section 5.2 section 5.9
- Do not replace a developing category or lifecycle with many independent flags. Use a more expressive structure or state field when several values may emerge. section 5.2 section 25.3.1
- Define the meaning of null, undefined, and missing values separately; they may not mean the same thing as false. section 5.9
Soft deletion
A resource can expose deleted: boolean, defaulting to false. Treat the field as output-only: the standard delete method changes it to true, and a custom undelete method changes it back. An ordinary update that includes deleted succeeds without changing the value. section 25.3.1










