# app.protoimsg.chat.ban

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

## Definitions

### `app.protoimsg.chat.ban`

**Type**: `record`

A ban issued by a room owner or moderator. Lives in the issuer's repo.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `room` | `string` (at-uri) | Yes | AT-URI of the room the ban applies to. |
| `reason` | `string` | No | Reason for the ban. |
| `subject` | `string` (did) | Yes | DID of the banned user. |
| `createdAt` | `string` (datetime) | Yes | Timestamp of ban. |

## Raw Schema

```json
{
  "id": "app.protoimsg.chat.ban",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "room",
          "subject",
          "createdAt"
        ],
        "properties": {
          "room": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the room the ban applies to."
          },
          "reason": {
            "type": "string",
            "maxLength": 300,
            "description": "Reason for the ban."
          },
          "subject": {
            "type": "string",
            "format": "did",
            "description": "DID of the banned user."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of ban."
          }
        }
      },
      "description": "A ban issued by a room owner or moderator. Lives in the issuer's repo."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
