Download OpenAPI specification:
Web API wrapper for the tunesynctool Python package with some extra features.
Returns information for all user accounts on the current instance.
Only users with admin rights should call this endpoint, otherwise the request will be rejected.
{- "items": [
- {
- "id": 0,
- "username": "string",
- "is_admin": false
}
], - "item_count": 0
}Create a new user.
Anyone may create a new account for themselves, assuming their chosen username is not already taken.
The instance owner may disable account creation. In that case, an error will be returned.
| username required | string (Username) [ 3 .. 255 ] characters Username must be unique and be at least 3 characters long. |
| password required | string (Password) [ 8 .. 255 ] characters Password must be at least 8 characters long. |
{- "username": "string",
- "password": "stringst"
}{- "id": 0,
- "username": "string",
- "is_admin": false
}Generates a bearer JWT for the user.
Requires the user to provide their username and password. The JWT is returned in the response body.
Grant Type (string) or Grant Type (null) (Grant Type) | |
| username required | string (Username) |
| password required | string <password> (Password) |
| scope | string (Scope) Default: "" |
Client Id (string) or Client Id (null) (Client Id) | |
Client Secret (string) or Client Secret (null) <password> (Client Secret) |
{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0
}Returns a list of all accepted provider names that clients can set in the ?provider= query parameter across endpoints.
An example use of this endpoint would be to populate a dropdown list in the client UI in a search field.
{- "items": [
- {
- "provider_name": "string",
- "is_configured": true,
- "linking": {
- "link_type": "oauth2",
- "target_url": "string",
- "linked": true
}, - "ui": {
- "description": "string",
- "display_name": "string",
- "favicon": "string"
}
}
], - "item_count": 0
}Generates a signed state to be used for OAuth2 authentication flows.
This is required for providers that users can link by going through an OAuth2 flow.
| provider_name required | string (Provider Name) |
| redirect_uri required | string <uri> (Redirect Uri) non-empty The redirect URI specified by the client. |
{
}{- "access_token": "string",
- "token_type": "string",
- "expires_in": 0
}Search using the specified provider. This is basically a proxy.
Results are returned in the order they are received from the provider, meaning you should not rely on their order.
Notes:
| provider required | string (Provider) |
| query required | string (Query) [ 3 .. 100 ] characters |
| limit | integer (Limit) [ 1 .. 10 ] Default: 5 |
{- "items": [
- {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}
], - "query": "string",
- "item_count": 0
}Search using the specified provider by a specific ISRC identifier. This is basically a proxy.
Notes:
| isrc required | string (Isrc) |
| provider required | string (Provider) |
{- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}Retrieve a track by its ID from the specified provider. This is basically a proxy.
Notes:
| provider_id required | string (Provider Id) |
| provider required | string (Provider) |
{- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}Retrieve a playlist by its ID from the specified provider. This is basically a proxy.
Notes:
| provider_id required | string (Provider Id) |
| provider required | string (Provider) |
{- "title": "string",
- "description": "string",
- "is_public": true,
- "author": {
- "primary": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}, - "identifiers": {
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}
}Retrieve a playlist by its ID from the specified provider. This is basically a proxy.
Notes:
| provider_id required | string (Provider Id) |
| provider required | string (Provider) |
{- "items": [
- {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}
], - "item_count": 0
}Add a track to a playlist on the specified provider.
| provider_id required | string (Provider Id) |
| provider required | string (Provider) |
| provider_ids required | Array of strings (Provider Ids) ID of the track to be inserted. Cannot be an empty string. |
{- "provider_ids": [
- "string"
]
}{- "items": [
- {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}
], - "item_count": 0
}Returns all playlists the user owns or has saved to their library on the specified provider. Keep in mind that results may not be exhaustive. Some providers may not return all playlists like those that are automatically generated.
Notes:
| provider required | string (Provider) |
| limit | integer (Limit) >= 0 Default: 0 |
{- "items": [
- {
- "title": "string",
- "description": "string",
- "is_public": true,
- "author": {
- "primary": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}, - "identifiers": {
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}
}
], - "item_count": 0
}Create a new playlist on the specified provider.
To keep things uniform, you cannot add initial tracks to the playlist because not all providers support this.
| provider required | string (Provider) |
| title required | string (Title) Title of the playlist. Cannot be an empty string. |
{- "title": "string"
}{- "title": "string",
- "description": "string",
- "is_public": true,
- "author": {
- "primary": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}, - "identifiers": {
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}
}Returns the user's saved tracks (aka. liked music) on the specified provider.
| provider required | string (Provider) |
| limit | integer (Limit) >= 0 Default: 0 |
{- "items": [
- {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}
], - "item_count": 0
}Matches a track based on the provided metadata. Finding a match is not 100% guaranteed.
This can take anywhere from a few seconds to up to half a minute in extreme cases.
Notes:
| provider required | string (Provider) Name of the provider to search with. |
| title required | string (Title) Title of the track. |
required | Album Name (string) or Album Name (null) (Album Name) Name of the album (if available). |
Duration (integer) or Duration (null) (Duration) Duration of the track in seconds (if available). | |
Track Number (integer) or Track Number (null) (Track Number) Track number in the album (if available). | |
Release Year (integer) or Release Year (null) (Release Year) Release year of the track (if available). | |
required | object (EntityMultiAuthorRead) Authors of the track. |
required | object (TrackIdentifiersThirdPartyBase) Identifiers of the track. |
required | object (EntityAssetsBase) Assets of the track. |
{- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string"
}, - "assets": {
- "cover_image": "string"
}
}{- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}Attempts to transfer the specified playlist from the source provider to the target provider. Replication is not guaranteed to be 100% successful.
This starts a long running task. Clients can poll for the progress of the transfer.
| from_provider required | string (From Provider) Origin provider for the playlist. |
| to_provider required | string (To Provider) Target provider to replicate the playlist on. |
| kind required | string (TaskKind) Value: "playlist_transfer" The type of the task. |
| is_dry_run required | boolean (Is Dry Run) If True, write operations will be avoided where possible. |
| from_playlist required | string (From Playlist) Source playlist you wish to replicate. |
{- "from_provider": "string",
- "to_provider": "string",
- "kind": "playlist_transfer",
- "is_dry_run": true,
- "from_playlist": "string"
}{- "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
- "status": "running",
- "status_reason": "string",
- "queued_at": 0,
- "started_at": 0,
- "done_at": 0,
- "worker_id": "string",
- "last_heartbeat": 0,
- "arguments": {
- "from_provider": "string",
- "to_provider": "string",
- "kind": "playlist_transfer",
- "is_dry_run": true,
- "from_playlist": "string"
}, - "progress": {
- "track": {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}, - "handled": 0,
- "in_queue": 0
}
}Returns all tasks belonging to the authenticated user, regardless of if they are running, in queue, or finished. The only exception is deleted tasks, for obvious reasons.
{- "items": [
- {
- "task_id": "736fde4d-9029-4915-8189-01353d6982cb",
- "status": "running",
- "status_reason": "string",
- "queued_at": 0,
- "started_at": 0,
- "done_at": 0,
- "worker_id": "string",
- "last_heartbeat": 0,
- "arguments": {
- "from_provider": "string",
- "to_provider": "string",
- "kind": "playlist_transfer",
- "is_dry_run": true,
- "from_playlist": "string"
}, - "progress": {
- "track": {
- "title": "string",
- "album_name": "string",
- "duration": 0,
- "track_number": 0,
- "release_year": 0,
- "author": {
- "primary": "string",
- "collaborating": [ ]
}, - "identifiers": {
- "isrc": "string",
- "musicbrainz": "string",
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}
}, - "handled": 0,
- "in_queue": 0
}
}
], - "item_count": 0
}Cancels the specified task. Users can only cancel their own tasks. It may take a few seconds for the background workers to honor this request.
Only tasks that are still active (queued, running, or on hold) are cancelled. Tasks that have already reached a terminal state (finished, failed, or cancelled) are left untouched and remain in the user's history.
| task_id required | string <uuid> (Task Id) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Deletes the specified task. Users can only delete their own tasks. It may take a few seconds for the background workers to honor this request.
Both active and inactive tasks can be deleted. The difference between this endpoint and the cancellation endpoint is that this removes the task from the task history.
| task_id required | string <uuid> (Task Id) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Compiles a list of playlists the user owns and has saved to their library across all of their linked providers.
Please note that this endpoint may not return up-to-date data because it relies on caching to prevent excessive API calls.
Notes:
{- "items": [
- {
- "title": "string",
- "description": "string",
- "is_public": true,
- "author": {
- "primary": "string"
}, - "meta": {
- "provider_name": "string",
- "share_url": "string"
}, - "identifiers": {
- "provider_id": "string"
}, - "assets": {
- "cover_image": "string"
}
}
], - "item_count": 0
}Starts the Spotify Authorization Code Flow. Redirects the user to the Spotify authorization page. The user will be asked to log in and authorize the application.
Details: https://developer.spotify.com/documentation/web-api/tutorials/code-flow
Takes a state parameter that includes metadata about the client.
| state required | string (State) |
nullUnlinks the Spotify account associated with the user.
| provider required | string (Provider) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Allows the user to set their Deezer ARL cookie.
| arl required | string (Arl) The ARL cookie's value. |
{- "arl": "string"
}{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Unlinks the Deezer account associated with the user.
| provider required | string (Provider) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Allows the user to set their Subsonic credentials.
| username required | string (Username) The Subsonic username. |
| password required | string (Password) The Subsonic password. |
{- "username": "string",
- "password": "string"
}{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Unlinks the Subsonic account associated with the user.
| provider required | string (Provider) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Starts the YouTube Authorization Code Flow. Redirects the user to the YouTube authorization page. The user will be asked to log in and authorize the application.
Details: https://developers.google.com/identity/protocols/oauth2
Takes a state parameter that includes metadata about the client.
| state required | string (State) |
nullUnlinks the Google account associated with the user.
| provider required | string (Provider) |
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}