# party.whey.files.prefs.pin

> A favourite drive or folder pinned in the sidebar. The record key is a stable hash of the subject. A drive pin uses kind=drive; a folder pin uses kind=dir and must also carry driveName, path, rkey, and collection.

- Kind: record
- Record key: any
- Authority: prefs.files.whey.party
- Lexicon: 1
- Published by [whey.party](https://lexicon.garden/identity/did:plc:mn45tewwnse5btfftvd3powc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mn45tewwnse5btfftvd3powc/party.whey.files.prefs.pin)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mn45tewwnse5btfftvd3powc/party.whey.files.prefs.pin/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mn45tewwnse5btfftvd3powc/party.whey.files.prefs.pin/analytics)

## Record (`party.whey.files.prefs.pin`)

Type: record · key any

### Properties

- `at` (string · datetime, required): When the item was pinned.
- `collection` (string · nsid): Folder collection. Required by core for kind=dir.
  - Constraints: enum: party.whey.files.dir
- `driveName` (string): Drive display name. Required by core for kind=dir; optional for kind=drive.
  - Constraints: minLength: 1, maxLength: 255
- `kind` (string, required)
  - Constraints: enum: drive | dir
- `name` (string, required): Display name of the drive or folder at pin time.
  - Constraints: minLength: 1, maxLength: 255
- `path` (string): Folder path inside the drive. Required by core for kind=dir.
  - Constraints: minLength: 1, maxLength: 4096
- `rkey` (string · record-key): Folder record key. Required by core for kind=dir.
- `space` (string, required): Canonical drive space: at:space/<authority>/party.whey.files.drive/<skey>.
  - Constraints: maxLength: 512

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A favourite drive or folder pinned in the sidebar. The record key is a stable hash of the subject. A drive pin uses kind=drive; a folder pin uses kind=dir and must also carry driveName, path, rkey, and collection.",
      "key": "any",
      "record": {
        "properties": {
          "at": {
            "description": "When the item was pinned.",
            "format": "datetime",
            "type": "string"
          },
          "collection": {
            "description": "Folder collection. Required by core for kind=dir.",
            "enum": [
              "party.whey.files.dir"
            ],
            "format": "nsid",
            "type": "string"
          },
          "driveName": {
            "description": "Drive display name. Required by core for kind=dir; optional for kind=drive.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "kind": {
            "enum": [
              "drive",
              "dir"
            ],
            "type": "string"
          },
          "name": {
            "description": "Display name of the drive or folder at pin time.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "path": {
            "description": "Folder path inside the drive. Required by core for kind=dir.",
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          },
          "rkey": {
            "description": "Folder record key. Required by core for kind=dir.",
            "format": "record-key",
            "type": "string"
          },
          "space": {
            "description": "Canonical drive space: at:space/<authority>/party.whey.files.drive/<skey>.",
            "maxLength": 512,
            "type": "string"
          }
        },
        "required": [
          "space",
          "name",
          "kind",
          "at"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "party.whey.files.prefs.pin",
  "lexicon": 1
}
```
