# dev.openplaylist.playlistItem

> Record containing a single playlist entry.

- Kind: record
- Record key: tid
- Authority: openplaylist.dev
- Lexicon: 1
- Published by [openplaylist.dev](https://lexicon.garden/identity/did:plc:giakgvcvljtnasoyluh3pf5a), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem/analytics)

## Record (`dev.openplaylist.playlistItem`)

Type: record · key tid

### Properties

- `addedBy` (ref): Who added the track. Maps to added_by in the ListenBrainz JSPF extension.
  - Reference: `dev.openplaylist.defs#contributor`
- `createdAt` (string · datetime, required): When the track was added. Maps to added_at in the ListenBrainz JSPF extension.
- `note` (string): Optional message from the contributor about their pick. Maps to the JSPF track annotation.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `order` (integer, required): Position in the playlist. Readers sort ascending; ties break on createdAt.
  - Constraints: minimum: 0
- `subject` (ref, required): Strong reference to the parent dev.openplaylist.playlist record.
  - Reference: `com.atproto.repo.strongRef`
- `track` (ref, required): Denormalized track metadata so the item renders without any further lookup.
  - Reference: `dev.openplaylist.defs#track`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record containing a single playlist entry.",
      "key": "tid",
      "record": {
        "properties": {
          "addedBy": {
            "description": "Who added the track. Maps to added_by in the ListenBrainz JSPF extension.",
            "ref": "dev.openplaylist.defs#contributor",
            "type": "ref"
          },
          "createdAt": {
            "description": "When the track was added. Maps to added_at in the ListenBrainz JSPF extension.",
            "format": "datetime",
            "type": "string"
          },
          "note": {
            "description": "Optional message from the contributor about their pick. Maps to the JSPF track annotation.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "order": {
            "description": "Position in the playlist. Readers sort ascending; ties break on createdAt.",
            "minimum": 0,
            "type": "integer"
          },
          "subject": {
            "description": "Strong reference to the parent dev.openplaylist.playlist record.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "track": {
            "description": "Denormalized track metadata so the item renders without any further lookup.",
            "ref": "dev.openplaylist.defs#track",
            "type": "ref"
          }
        },
        "required": [
          "subject",
          "track",
          "order",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "One track in a dev.openplaylist.playlist. Lives in the same repo as the playlist when added through the hosting app; a signed-in contributor may later write one into their own repo pointing at someone else's playlist.",
  "id": "dev.openplaylist.playlistItem",
  "lexicon": 1
}
```
