# blog.brookie.vault.document

> Published by [brookie.blog](https://lexicon.garden/identity/did:plc:v46ojbiop5ebs5h7gaomixcc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.vault.document)
- [Documentation](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.vault.document/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.vault.document/examples)

## Definitions

### `blog.brookie.vault.document`

**Type**: `record`

A document in a vault. The record key is the document's permanent identity; the path is a mutable field, which is what makes a rename a one-field update rather than a delete and recreate.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `path` | `string` | Yes | Logical path, e.g. 'Books/The Dispossessed.md'. Looks like a file path but is not one: folder hierarchy is a projection of these strings, not a protocol concept. |
| `content` | `string` | No | Document body, inlined when small enough. Exactly one of content or contentBlob is present. |
| `createdAt` | `string` (datetime) | Yes |  |
| `updatedAt` | `string` (datetime) | Yes |  |
| `contentBlob` | `blob` | No | Document body as bytes: an attachment (image, audio, PDF), or a text document too large to inline. |
| `contentType` | `string` | Yes | Usually text/markdown. |

## Raw Schema

```json
{
  "id": "blog.brookie.vault.document",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "path",
          "contentType",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 2048,
            "description": "Logical path, e.g. 'Books/The Dispossessed.md'. Looks like a file path but is not one: folder hierarchy is a projection of these strings, not a protocol concept."
          },
          "content": {
            "type": "string",
            "maxLength": 65536,
            "description": "Document body, inlined when small enough. Exactly one of content or contentBlob is present."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime"
          },
          "contentBlob": {
            "type": "blob",
            "accept": [
              "*/*"
            ],
            "description": "Document body as bytes: an attachment (image, audio, PDF), or a text document too large to inline."
          },
          "contentType": {
            "type": "string",
            "description": "Usually text/markdown."
          }
        }
      },
      "description": "A document in a vault. The record key is the document's permanent identity; the path is a mutable field, which is what makes a rename a one-field update rather than a delete and recreate."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
