Delete a Movie

This API command will delete a movie from the Plex server.

URL

DELETE http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.
idThe ID associated with the movie to be deleted. This key can be found by calling the Get All Movies API command and using the value from the ratingKey associated with the movie.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.
404Not Found - The movie associated with the ID does not exist.

Response

There is no response returned by the server. Check the return status code to determine success.

Remarks

This API command will also delete the files and folders associated with the movie from storage.

Examples

curl -X DELETE http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}
response = requests.delete(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/library/metadata/{id}?X-Plex-Token={plex_token}' -Method 'DELETE'
Write-Output $response
Subscribe
Display