app.protoimsg.chat.message

lexicons.protoimsg.app

{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "description": "Width and height for layout before media loads.",
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "blockquote": {
      "description": "Facet feature for a block quotation.",
      "properties": {},
      "type": "object"
    },
    "bold": {
      "description": "Facet feature for bold text.",
      "properties": {},
      "type": "object"
    },
    "byteSlice": {
      "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text.",
      "properties": {
        "byteEnd": {
          "minimum": 0,
          "type": "integer"
        },
        "byteStart": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "byteStart",
        "byteEnd"
      ],
      "type": "object"
    },
    "codeBlock": {
      "description": "Facet feature for a code block. The text contains the code content.",
      "properties": {
        "lang": {
          "description": "Programming language for syntax highlighting.",
          "maxLength": 50,
          "type": "string"
        }
      },
      "type": "object"
    },
    "codeInline": {
      "description": "Facet feature for inline code.",
      "properties": {},
      "type": "object"
    },
    "externalEmbed": {
      "description": "External link card.",
      "properties": {
        "description": {
          "description": "Description or summary.",
          "maxLength": 1000,
          "type": "string"
        },
        "thumb": {
          "accept": [
            "image/png",
            "image/jpeg"
          ],
          "description": "Thumbnail image for the link card.",
          "maxSize": 1000000,
          "type": "blob"
        },
        "title": {
          "description": "Title of the external content.",
          "maxLength": 300,
          "type": "string"
        },
        "uri": {
          "description": "URL of the external content.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "title"
      ],
      "type": "object"
    },
    "imageEmbed": {
      "description": "Embedded images.",
      "properties": {
        "images": {
          "items": {
            "ref": "#imageItem",
            "type": "ref"
          },
          "maxLength": 4,
          "type": "array"
        }
      },
      "required": [
        "images"
      ],
      "type": "object"
    },
    "imageItem": {
      "description": "A single embedded image.",
      "properties": {
        "alt": {
          "description": "Alt text for accessibility.",
          "maxLength": 2000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "image": {
          "accept": [
            "image/png",
            "image/jpeg",
            "image/gif",
            "image/webp"
          ],
          "description": "Image blob reference.",
          "maxSize": 1000000,
          "type": "blob"
        }
      },
      "required": [
        "image",
        "alt"
      ],
      "type": "object"
    },
    "italic": {
      "description": "Facet feature for italic text.",
      "properties": {},
      "type": "object"
    },
    "link": {
      "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",
      "properties": {
        "uri": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "uri"
      ],
      "type": "object"
    },
    "main": {
      "description": "A chat message. Lives in the sender's repo, points to a channel.",
      "key": "tid",
      "record": {
        "properties": {
          "channel": {
            "description": "AT-URI of the channel record this message belongs to.",
            "format": "at-uri",
            "type": "string"
          },
          "createdAt": {
            "description": "Timestamp of message creation.",
            "format": "datetime",
            "type": "string"
          },
          "embed": {
            "description": "Embedded media or link card.",
            "refs": [
              "#imageEmbed",
              "#videoEmbed",
              "#externalEmbed"
            ],
            "type": "union"
          },
          "facets": {
            "description": "Rich text annotations (mentions, links, tags, formatting). Extends the Bluesky facet convention with additional formatting features.",
            "items": {
              "ref": "#richTextFacet",
              "type": "ref"
            },
            "type": "array"
          },
          "reply": {
            "description": "Structured reply reference for threading.",
            "ref": "#replyRef",
            "type": "ref"
          },
          "text": {
            "description": "Message text content.",
            "maxGraphemes": 1000,
            "maxLength": 3000,
            "type": "string"
          }
        },
        "required": [
          "channel",
          "text",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "mention": {
      "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "replyRef": {
      "description": "Thread reply reference with root and parent for efficient deep thread traversal.",
      "properties": {
        "parent": {
          "description": "AT-URI of the direct parent message being replied to.",
          "format": "at-uri",
          "type": "string"
        },
        "root": {
          "description": "AT-URI of the root message in the thread.",
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "root",
        "parent"
      ],
      "type": "object"
    },
    "richTextFacet": {
      "description": "Annotation of a sub-string within rich text.",
      "properties": {
        "features": {
          "items": {
            "refs": [
              "#mention",
              "#link",
              "#tag",
              "#bold",
              "#italic",
              "#strikethrough",
              "#codeInline",
              "#codeBlock",
              "#blockquote"
            ],
            "type": "union"
          },
          "type": "array"
        },
        "index": {
          "ref": "#byteSlice",
          "type": "ref"
        }
      },
      "required": [
        "index",
        "features"
      ],
      "type": "object"
    },
    "strikethrough": {
      "description": "Facet feature for strikethrough text.",
      "properties": {},
      "type": "object"
    },
    "tag": {
      "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not.",
      "properties": {
        "tag": {
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "tag"
      ],
      "type": "object"
    },
    "videoEmbed": {
      "description": "Embedded video.",
      "properties": {
        "alt": {
          "description": "Alt text for accessibility.",
          "maxLength": 2000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "thumbnail": {
          "accept": [
            "image/png",
            "image/jpeg"
          ],
          "description": "Video thumbnail image.",
          "maxSize": 1000000,
          "type": "blob"
        },
        "video": {
          "accept": [
            "video/mp4",
            "video/webm"
          ],
          "description": "Video blob reference.",
          "maxSize": 50000000,
          "type": "blob"
        }
      },
      "required": [
        "video"
      ],
      "type": "object"
    }
  },
  "id": "app.protoimsg.chat.message",
  "lexicon": 1
}

Validate Record

Validate a record against app.protoimsg.chat.message

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:xk3xpcauatfephlieonmluh4
CID
bafyreidwns3nya4swqrfyc2gkt2hlvuoplq66d6xorzgcbqdnxprr3s2cy
Indexed At
2026-07-26 20:16 UTC
AT-URI
at://did:plc:xk3xpcauatfephlieonmluh4/com.atproto.lexicon.schema/app.protoimsg.chat.message

Similar Lexicons

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Record containing a Streamplace chat message.

  • fyi.opensocial.chat.message recordnot from the namespace authority

    A message in a group's chat, in its author's own repo in the group's chat space.

  • A message posted into a chat channel, or a comment inside a forum thread. Always written into the author's own repo within the space.

  • A single message sent to a turtle meat chat room. Messages live in the author's own repository; a room is assembled by reading the backlinks that point at it.

  • org.4906.temp.message recordnot from the namespace authority

    A message sent in a channel.

Lexicon Garden

@