{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A correspondence letter.",
      "key": "tid",
      "record": {
        "properties": {
          "body": {
            "description": "Letter body in the CommonMark subset defined by the ATProsebox presentation contract.",
            "maxLength": 100000,
            "type": "string"
          },
          "box": {
            "description": "DID of the recipient. Delivery is indexing: an inbox is letters whose box is one's own DID.",
            "format": "did",
            "maxLength": 2048,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "deliverAt": {
            "description": "Optional delayed-arrival timestamp. Renderers should not display the letter in the recipient's inbox before this time.",
            "format": "datetime",
            "type": "string"
          },
          "replyTo": {
            "description": "AT-URI of the letter this one replies to.",
            "format": "at-uri",
            "maxLength": 8192,
            "type": "string"
          },
          "subject": {
            "maxGraphemes": 256,
            "maxLength": 640,
            "type": "string"
          }
        },
        "required": [
          "box",
          "body",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A letter of correspondence addressed to a specific DID. Letters are immutable once sent; corrections are new letters.",
  "id": "fyi.filed.prosebox.letter",
  "lexicon": 1
}
