--- id: upload-playlist sidebar_label: Upload Playlist hide_title: true hide_table_of_contents: true api: {"tags":["Playlists"],"description":"Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.\n","operationId":"uploadPlaylist","parameters":[{"name":"path","description":"absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. \nIf the `path` argument is a directory, that path will be scanned for playlist files to be processed. \nEach file in that directory creates a separate playlist, with a name based on the filename of the file that created it. \nThe GUID of each playlist is based on the filename. \nIf the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. \nThe GUID of each playlist is based on the filename.\n","in":"query","schema":{"type":"string","example":"/home/barkley/playlist.m3u"},"required":true},{"name":"force","description":"force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. \nThe `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.\n","in":"query","schema":{"type":"number","enum":[0,1]},"required":true}],"responses":{"200":{"description":"The playlist is uploaded"},"401":{"description":"Unauthorized - Returned if the X-Plex-Token is missing from the header or query.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number","example":1001},"message":{"type":"string","example":"User could not be authenticated"},"status":{"type":"number","example":401}}}}}}}}}},"method":"post","path":"/playlists/upload","servers":[{"url":"http://{Local IP}:{Port}","variables":{"Local IP":{"default":"10.10.10.47","description":"The Local IP Address of your plex server"},"Port":{"default":"32400","description":"The port to access your plex server"}}},{"url":"https://{Local IP}:{Port}","variables":{"Local IP":{"default":"10.10.10.47","description":"The Local IP Address of your plex server"},"Port":{"default":"32400","description":"The port to access your plex server"}}}],"security":[{"Token":[],"ClientIdentifier":[],"Device":[],"DeviceName":[],"Platform":[],"PlatformVersion":[],"Product":[],"Version":[]}],"securitySchemes":{"Token":{"description":"Plex Authentication Token","type":"apiKey","in":"header","name":"X-Plex-Token"},"ClientIdentifier":{"description":"Plex Authentication Token","type":"apiKey","in":"header","name":"X-Plex-Client-Identifier"},"DeviceName":{"description":"Primary name for the device eg. `Plex Web (Chrome)`","type":"apiKey","in":"header","name":"X-Plex-Device-Name"},"Device":{"description":"The type of device your application is running on\nDevice name and or model number, eg `iPhone3,2`, `Motorola XOOMâ„¢`, `LG5200TV`\n","type":"apiKey","in":"header","name":"X-Plex-Device"},"PlatformVersion":{"description":"Operating system version\neg `4.3.1`, `10.6.7`, `3.2`\n","type":"apiKey","in":"header","name":"X-Plex-Platform-Version"},"Platform":{"description":"Platform name \neg: `Web`, `iOS`, `MacOSX`, `Android`, `LG`\n","type":"apiKey","in":"header","name":"X-Plex-Platform"},"Product":{"description":"Plex application name \neg: `Laika`, `Plex Media Server`, `Media Link`\n","type":"apiKey","in":"header","name":"X-Plex-Product"},"Version":{"description":"Plex application version number","type":"apiKey","in":"header","name":"X-Plex-Version"}},"info":{"title":"Plex-API","summary":"A Plex Media Server API Map","description":"An Open API Spec for interacting with Plex.tv and Plex Servers","version":"0.0.3","contact":{"name":"Luke Hagar","url":"https://www.LukeHagar.com","email":"Lukeslakemail@gmail.com"},"license":{"name":"MIT","identifier":"MIT","url":"https://opensource.org/licenses/MIT"}},"postman":{"name":"Upload Playlist","description":{"content":"Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.\n","type":"text/plain"},"url":{"path":["playlists","upload"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. \nIf the `path` argument is a directory, that path will be scanned for playlist files to be processed. \nEach file in that directory creates a separate playlist, with a name based on the filename of the file that created it. \nThe GUID of each playlist is based on the filename. \nIf the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. \nThe GUID of each playlist is based on the filename.\n","type":"text/plain"},"key":"path","value":""},{"disabled":false,"description":{"content":"(Required) force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. \nThe `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded.\n","type":"text/plain"},"key":"force","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} sidebar_class_name: "post api-method" info_path: docs/plex-media-server/plex-api --- import ApiTabs from "@theme/ApiTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import MethodEndpoint from "@theme/ApiDemoPanel/MethodEndpoint"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import TabItem from "@theme/TabItem";