Adding a track to a playlist
An AddAction for one entry in a Spotify playlist. The track is the object and the playlist, an Entity, is the target. The action is keyed by the track, the playlist, and when the track was added.
{
"@type": "AddAction",
"@key": ["@type", "source", "object.sourceId", "target.sourceId", "timestamp"],
"source": "spotify",
"timestamp": "2026-04-03T12:00:00.000Z",
"agent": {
"@type": "Agent",
"@key": ["@type", "source", "handle"],
"source": "spotify",
"handle": "pat",
"name": "Pat Example",
"url": "https://open.spotify.com/user/pat",
"sameAs": ["@me"]
},
"object": {
"@type": "MusicRecording",
"@key": ["@type", "source", "sourceId"],
"source": "spotify",
"sourceId": "6mT8qR2vN5xK9pL3bH7wC4",
"url": "https://open.spotify.com/track/6mT8qR2vN5xK9pL3bH7wC4",
"name": "Morning Light",
"duration": "PT215S"
},
"target": {
"@type": "Entity",
"@key": ["@type", "source", "sourceId"],
"source": "spotify",
"sourceId": "3cF6hJ8kM1nP4qS7tV9wX2",
"url": "https://open.spotify.com/playlist/3cF6hJ8kM1nP4qS7tV9wX2",
"name": "Road Trip"
}
}{
"@context": {
"@vocab": "https://schema.chronicle.app/",
"doc": "https://schema.chronicle.app/docs/"
},
"@type": "AddAction",
"doc:key": {
"@list": ["@type", "source", "object.sourceId", "target.sourceId", "timestamp"]
},
"source": "spotify",
"timestamp": {
"@value": "2026-04-03T12:00:00.000Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
},
"agent": {
"@type": "Agent",
"doc:key": {
"@list": ["@type", "source", "handle"]
},
"source": "spotify",
"handle": "pat",
"name": "Pat Example",
"url": "https://open.spotify.com/user/pat",
"sameAs": ["@me"]
},
"object": {
"@type": "MusicRecording",
"doc:key": {
"@list": ["@type", "source", "sourceId"]
},
"source": "spotify",
"sourceId": "6mT8qR2vN5xK9pL3bH7wC4",
"url": "https://open.spotify.com/track/6mT8qR2vN5xK9pL3bH7wC4",
"name": "Morning Light",
"duration": "PT215S"
},
"target": {
"@type": "Entity",
"doc:key": {
"@list": ["@type", "source", "sourceId"]
},
"source": "spotify",
"sourceId": "3cF6hJ8kM1nP4qS7tV9wX2",
"url": "https://open.spotify.com/playlist/3cF6hJ8kM1nP4qS7tV9wX2",
"name": "Road Trip"
}
}@prefix : <https://schema.chronicle.app/> .
@prefix doc: <https://schema.chronicle.app/docs/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[
a :AddAction;
doc:key ("@type" "source" "object.sourceId" "target.sourceId" "timestamp");
:source "spotify";
:timestamp "2026-04-03T12:00:00.000Z"^^xsd:dateTime;
:agent [
a :Agent;
doc:key ("@type" "source" "handle");
:source "spotify";
:handle "pat";
:name "Pat Example";
:url "https://open.spotify.com/user/pat";
:sameAs "@me"
];
:object [
a :MusicRecording;
doc:key ("@type" "source" "sourceId");
:source "spotify";
:sourceId "6mT8qR2vN5xK9pL3bH7wC4";
:url "https://open.spotify.com/track/6mT8qR2vN5xK9pL3bH7wC4";
:name "Morning Light";
:duration "PT215S"
];
:target [
a :Entity;
doc:key ("@type" "source" "sourceId");
:source "spotify";
:sourceId "3cF6hJ8kM1nP4qS7tV9wX2";
:url "https://open.spotify.com/playlist/3cF6hJ8kM1nP4qS7tV9wX2";
:name "Road Trip"
]
] .