Script for Sonarr (automatic deletion)

Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS: Linux
Debug logs: x
Description of issue: x


I ask for help in creating a Linux Curl or sh script that would remove a serial from Sonarr that has the “Unmonitored” status


  1. 3.0.5 is out of date; 3.0.6 is current
  2. The entire UI is lipstick on the API; do it in the UI, watch the api calls with your browser dev tools and you can go from there.

you’d need to get the series; figure out what is unmontiored and then delete

limited, incomplete API documentation is here

Yes. Thank you. I saw this, but unfortunately I did not figure out exactly how to do what I need

It works like this:


ids=$(curl --silent $HOST/api/series -X GET -H "X-Api-Key: $API_KEY" \
  | jq '.[] | select(.monitored == false) | .id')

for id in $ids; do
  echo "Deleting movie id $id"
  curl --silent $HOST/api/series/$id -X DELETE -H "X-Api-Key: $API_KEY"

How to make it so that when I delete a series through Plex, the status monitored == false also changes in sonar. What does it have to do not for each episode separately, but for the whole series?