# dev.openplaylist.playlistItem

> Published by [openplaylist.dev](https://lexicon.garden/identity/did:plc:giakgvcvljtnasoyluh3pf5a)

✓ This is the authoritative definition for this NSID.

## 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.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem)
- [Documentation](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:giakgvcvljtnasoyluh3pf5a/dev.openplaylist.playlistItem/examples)

## Definitions

### `dev.openplaylist.playlistItem`

**Type**: `record`

Record containing a single playlist entry.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `addedBy` | `ref` → `dev.openplaylist.defs#contributor` | No | Who added the track. Maps to added_by in the ListenBrainz JSPF extension. |
| `createdAt` | `string` (datetime) | Yes | When the track was added. Maps to added_at in the ListenBrainz JSPF extension. |
| `note` | `string` | No | Optional message from the contributor about their pick. Maps to the JSPF track annotation. |
| `order` | `integer` | Yes | Position in the playlist. Readers sort ascending; ties break on createdAt. |
| `subject` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference to the parent dev.openplaylist.playlist record. |
| `track` | `ref` → `dev.openplaylist.defs#track` | Yes | Denormalized track metadata so the item renders without any further lookup. |

## Raw 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
}
```
