API to add a track to a playlist

Hi everyone,
I’m poking around using the API to create a playlists and fill it with some track.
I found how to create a playlist but (incredibly) I wasn’t able to find how to add a track.
To create the playlist I used “core.playlists.create” but how can I add a track to the new playlist?
I could find into the documentation, I’d probably miss something… but what? :smile:

Any link/help/tip will be appreciated.

Thank you,

Use playlist = playstlist.copy(tracks=[...]) and then use core.playlist.save(playlist) - https://docs.mopidy.com/en/latest/api/core/#mopidy.core.PlaylistsController.save might also be of use.

You can also use some of the tests as examples.

I can find no such thing as playlist.copy in the API (I am using websockets here), which is logical, as there is no playlist object that can have methods over JSON-RPC.

So how is this to be done with the API?