# app.protoimsg.chat.room

> Published by [lexicons.protoimsg.app](https://lexicon.garden/identity/did:plc:xk3xpcauatfephlieonmluh4)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.room)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.room/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.room/examples)

## Definitions

### `app.protoimsg.chat.room`

**Type**: `record`

Declares a chat room. Created by whoever starts the room.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name for the room. |
| `topic` | `string` | Yes | Room topic for sorting, filtering, and discovery. |
| `purpose` | `string` | Yes | Room purpose categorization. |
| `category` | `string` | No | Broad category for room discovery (e.g., music, tech, gaming). Lowercased. |
| `settings` | `ref` → `#roomSettings` | No |  |
| `createdAt` | `string` (datetime) | Yes | Timestamp of room creation. |
| `description` | `string` | No | What the room is about. |

### `app.protoimsg.chat.room#roomSettings`

**Type**: `object`

Configurable room settings.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `visibility` | `string` | No | Room discoverability. public = listed in directory, unlisted = link only, private = invite only. |
| `slowModeSeconds` | `integer` | No | Minimum seconds between messages per user. 0 = disabled. |
| `allowlistEnabled` | `boolean` | No | When true, only users on the room allowlist can send messages. |
| `minAccountAgeDays` | `integer` | No | Minimum atproto account age in days to participate. |

## Raw Schema

```json
{
  "id": "app.protoimsg.chat.room",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "topic",
          "purpose",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Display name for the room."
          },
          "topic": {
            "type": "string",
            "maxLength": 200,
            "description": "Room topic for sorting, filtering, and discovery."
          },
          "purpose": {
            "type": "string",
            "description": "Room purpose categorization.",
            "knownValues": [
              "discussion",
              "event",
              "community",
              "support"
            ]
          },
          "category": {
            "type": "string",
            "maxLength": 50,
            "description": "Broad category for room discovery (e.g., music, tech, gaming). Lowercased."
          },
          "settings": {
            "ref": "#roomSettings",
            "type": "ref"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of room creation."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "What the room is about."
          }
        }
      },
      "description": "Declares a chat room. Created by whoever starts the room."
    },
    "roomSettings": {
      "type": "object",
      "properties": {
        "visibility": {
          "type": "string",
          "default": "public",
          "description": "Room discoverability. public = listed in directory, unlisted = link only, private = invite only.",
          "knownValues": [
            "public",
            "unlisted",
            "private"
          ]
        },
        "slowModeSeconds": {
          "type": "integer",
          "default": 0,
          "minimum": 0,
          "description": "Minimum seconds between messages per user. 0 = disabled."
        },
        "allowlistEnabled": {
          "type": "boolean",
          "default": false,
          "description": "When true, only users on the room allowlist can send messages."
        },
        "minAccountAgeDays": {
          "type": "integer",
          "default": 0,
          "minimum": 0,
          "description": "Minimum atproto account age in days to participate."
        }
      },
      "description": "Configurable room settings."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
