# email.atmos.folderRevision

> ALPHA. Immutable create-only causal revision for one 71-character stable folder identity. The revision and deterministic email.atmos.folderOperation claim are created atomically. Standard role identities, names, and roles are canonical and cannot be renamed, rebound, or deleted. Custom rename conflicts reduce by revision height then unsigned UTF-8 operation-ID order; tombstone is grow-only.

- Kind: record
- Record key: any
- Authority: atmos.email
- Lexicon: 1
- Published by [comail.at](https://lexicon.garden/identity/did:plc:yu6rmwoemqfnmsdkljyvmuhg), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yu6rmwoemqfnmsdkljyvmuhg/email.atmos.folderRevision)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yu6rmwoemqfnmsdkljyvmuhg/email.atmos.folderRevision/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yu6rmwoemqfnmsdkljyvmuhg/email.atmos.folderRevision/analytics)

## Record (`email.atmos.folderRevision`)

Type: record · key any

### Properties

- `createdAt` (string · datetime, required): Audit metadata only. Reducers never use client time for conflict ordering.
- `folderId` (string, required)
  - Constraints: minLength: 71, maxLength: 71
- `merge` (boolean): True only for a parent-only causal-head join with no field assignments.
- `name` (string)
  - Constraints: minLength: 1, maxLength: 255
- `operationId` (string, required)
  - Constraints: minLength: 1, maxLength: 128
- `parents` (array, required)
  - Constraints: maxLength: 64
  - `items` (string)
    - Constraints: minLength: 77, maxLength: 77
- `revision` (integer, required)
  - Constraints: minimum: 1, maximum: 9007199254740991
- `role` (string): Assigned only on a standard-role root. Runtime validation closes knownValues and requires the deterministic folder ID and canonical display name for this role.
  - Constraints: maxLength: 64, knownValues: inbox | archive | drafts | sent | junk | trash | important
- `tombstone` (boolean): Grow-only irreversible deletion for custom folders. Canonical standard folders cannot be tombstoned; an observed tombstone forbids later live assignments.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "ALPHA. Immutable create-only causal revision for one 71-character stable folder identity. The revision and deterministic email.atmos.folderOperation claim are created atomically. Standard role identities, names, and roles are canonical and cannot be renamed, rebound, or deleted. Custom rename conflicts reduce by revision height then unsigned UTF-8 operation-ID order; tombstone is grow-only.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Audit metadata only. Reducers never use client time for conflict ordering.",
            "format": "datetime",
            "type": "string"
          },
          "folderId": {
            "maxLength": 71,
            "minLength": 71,
            "type": "string"
          },
          "merge": {
            "description": "True only for a parent-only causal-head join with no field assignments.",
            "type": "boolean"
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "operationId": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "parents": {
            "items": {
              "maxLength": 77,
              "minLength": 77,
              "type": "string"
            },
            "maxLength": 64,
            "type": "array"
          },
          "revision": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "role": {
            "description": "Assigned only on a standard-role root. Runtime validation closes knownValues and requires the deterministic folder ID and canonical display name for this role.",
            "knownValues": [
              "inbox",
              "archive",
              "drafts",
              "sent",
              "junk",
              "trash",
              "important"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "tombstone": {
            "description": "Grow-only irreversible deletion for custom folders. Canonical standard folders cannot be tombstoned; an observed tombstone forbids later live assignments.",
            "type": "boolean"
          }
        },
        "required": [
          "folderId",
          "operationId",
          "parents",
          "revision",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "email.atmos.folderRevision",
  "lexicon": 1
}
```
