# wiki.lichen.noteRevision

> Published by [lichen.wiki](https://lexicon.garden/identity/did:plc:xfs42pjf3n7imvgrdrp7xvez)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xfs42pjf3n7imvgrdrp7xvez/wiki.lichen.noteRevision)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xfs42pjf3n7imvgrdrp7xvez/wiki.lichen.noteRevision/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xfs42pjf3n7imvgrdrp7xvez/wiki.lichen.noteRevision/examples)

## Definitions

### `wiki.lichen.noteRevision`

**Type**: `record`

A revision to a note, stored as a diff from the previous revision.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `diff` | `string` | Yes | The diff content in the format specified by diffFormat. |
| `blobs` | `array` | No | Blobs referenced by this revision's content. |
| `message` | `string` | No | Optional commit message describing this revision. |
| `noteRef` | `string` (at-uri) | Yes | AT-URI of the parent note record. |
| `createdAt` | `string` (datetime) | Yes | When this revision was created. |
| `diffFormat` | `string` | Yes | Format of the diff string. |
| `parentRevision` | `string` (at-uri) | No | AT-URI of the previous revision. Omitted for the first revision of a note. |

## Raw Schema

```json
{
  "id": "wiki.lichen.noteRevision",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "noteRef",
          "diff",
          "diffFormat",
          "createdAt"
        ],
        "properties": {
          "diff": {
            "type": "string",
            "maxLength": 1000000,
            "description": "The diff content in the format specified by diffFormat."
          },
          "blobs": {
            "type": "array",
            "items": {
              "type": "blob",
              "accept": [
                "image/jpeg",
                "image/png",
                "image/gif",
                "image/webp"
              ],
              "maxSize": 2097152
            },
            "description": "Blobs referenced by this revision's content."
          },
          "message": {
            "type": "string",
            "maxLength": 10240,
            "description": "Optional commit message describing this revision.",
            "maxGraphemes": 1024
          },
          "noteRef": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the parent note record."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When this revision was created."
          },
          "diffFormat": {
            "type": "string",
            "maxLength": 32,
            "description": "Format of the diff string.",
            "knownValues": [
              "diff-match-patch"
            ]
          },
          "parentRevision": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the previous revision. Omitted for the first revision of a note."
          }
        }
      },
      "description": "A revision to a note, stored as a diff from the previous revision."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
