Orchdio API documentation
  • 👋Welcome!
  • Quick Start
  • Reference
    • API Reference
      • 🔒 Authentication
        • Spotify
        • Deezer
        • Apple Music
      • ⚛️Entity
        • Track
        • Playlist
      • 📑Library management
        • Add playlist to library
      • 👥Account management
        • Account information
        • Library playlists
        • Library artists
        • Library albums
        • Listening history
      • 🪝Webhooks
  • ⚗️Miscellaneous
    • Target platform values
    • 🔮Showcases
    • FAQ (The frequent "whats" and "whys")
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. Library management

Add playlist to library

PreviousLibrary managementNextAccount management

Last updated 1 year ago

You can add a playlist to a user's streaming library by calling the endpoint below.

This endpoint requires that you use your private key. It is recommended to make the request from your own backend and make a request to that endpoint from the frontend of you app. This is to prevent accidentally leaking your private keys

If you notice your keys have been accidentally exposed, you can revoke from the . You'll get get new keys you can then update where the old keys were (securely) used.

To add a playlist to a user's library, you can use the user's email address in the user request body field. The request body also requires you pass the title and the tracks you want to add to the playlist. Tracks are arrays of track IDs and are different, depending on the platform.

On Deezer, track IDs are integers. The pattern is 2794600.

TIDAL track IDs are also integers and their pattern is 90151608.

Spotify uses a special ID format for track IDs and an example is 29rN8gurWhQt6dPPwA2Dti.

Apple Music uses integers and an example is 1544326461.

The IDs must have the same pattern and if any of them is invalid, the request would be rejected. The response contains the link to the playlist on the user's library.

POST https://api.orchdio.dev/playlist/{platform}/add

Headers

Name
Type
Description

x-orchdio-key*

String

Your app's private key

{
	"data": "https://www.deezer.com/en/playlist/11095284442",
	"message": "Request Ok",
	"status": 201
}
{
	"error": "Internal error",
	"message": "An internal error occured",
	"status": 500
}

The following response is returned

// Some code
{
   "data":"https://www.deezer.com/en/playlist/11395402524",
   "message":"Request Ok",
   "status":201
}
📑
dashboard