# app.protoimsg.chat.channel

> 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.channel)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.channel/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.channel/examples)

## Definitions

### `app.protoimsg.chat.channel`

**Type**: `record`

A channel within a chat room. Created by the room owner.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Display name for the channel. |
| `room` | `string` (at-uri) | Yes | AT-URI of the room this channel belongs to. |
| `position` | `integer` | No | Sort position within the room. Lower numbers appear first. |
| `createdAt` | `string` (datetime) | Yes | Timestamp of channel creation. |
| `postPolicy` | `string` | No | Who can post messages in this channel. |
| `description` | `string` | No | What the channel is about. |

## Raw Schema

```json
{
  "id": "app.protoimsg.chat.channel",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "room",
          "name",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Display name for the channel."
          },
          "room": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the room this channel belongs to."
          },
          "position": {
            "type": "integer",
            "minimum": 0,
            "description": "Sort position within the room. Lower numbers appear first."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of channel creation."
          },
          "postPolicy": {
            "type": "string",
            "description": "Who can post messages in this channel.",
            "knownValues": [
              "everyone",
              "owner",
              "moderators"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "What the channel is about."
          }
        }
      },
      "description": "A channel within a chat room. Created by the room owner."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
