# art.xx-c.chat.message

> Published by [charlebois.info](https://lexicon.garden/identity/did:plc:y3lae7hmqiwyq7w2v3bcb2c2)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:y3lae7hmqiwyq7w2v3bcb2c2/art.xx-c.chat.message)
- [Documentation](https://lexicon.garden/lexicon/did:plc:y3lae7hmqiwyq7w2v3bcb2c2/art.xx-c.chat.message/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:y3lae7hmqiwyq7w2v3bcb2c2/art.xx-c.chat.message/examples)

## Definitions

### `art.xx-c.chat.message`

**Type**: `record`

Encrypted chat message for XX C chat room

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `iv` | `string` | Yes | Initialization vector for AES-GCM (base64 encoded) |
| `roomId` | `string` | Yes | Identifier for chat room (e.g., 'main') |
| `authTag` | `string` | No | Authentication tag for GCM mode (base64 encoded) |
| `replyTo` | `string` (at-uri) | No | Optional: AT-URI of message being replied to |
| `createdAt` | `string` (datetime) | Yes | Timestamp when message was created |
| `encryptedContent` | `string` | Yes | AES-256-GCM encrypted message content (base64 encoded) |
| `encryptionVersion` | `string` | No | Encryption scheme version (currently v1: HKDF + AAD) |

## Raw Schema

```json
{
  "id": "art.xx-c.chat.message",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "encryptedContent",
          "roomId",
          "iv",
          "createdAt"
        ],
        "properties": {
          "iv": {
            "type": "string",
            "maxLength": 24,
            "description": "Initialization vector for AES-GCM (base64 encoded)"
          },
          "roomId": {
            "type": "string",
            "maxLength": 64,
            "description": "Identifier for chat room (e.g., 'main')"
          },
          "authTag": {
            "type": "string",
            "maxLength": 32,
            "description": "Authentication tag for GCM mode (base64 encoded)"
          },
          "replyTo": {
            "type": "string",
            "format": "at-uri",
            "description": "Optional: AT-URI of message being replied to"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when message was created"
          },
          "encryptedContent": {
            "type": "string",
            "maxLength": 10000,
            "description": "AES-256-GCM encrypted message content (base64 encoded)"
          },
          "encryptionVersion": {
            "type": "string",
            "description": "Encryption scheme version (currently v1: HKDF + AAD)"
          }
        }
      },
      "description": "Encrypted chat message for XX C chat room"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
