From 6b75f3215994d0372ecf724199772109896e77ba Mon Sep 17 00:00:00 2001 From: IreuN Date: Wed, 6 May 2026 02:06:02 +0200 Subject: [PATCH 1/2] Add 'Set torrent comment' section to API documentation Added documentation for setting torrent comments in the API. --- WebUI-API-(qBittorrent-5.0).md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/WebUI-API-(qBittorrent-5.0).md b/WebUI-API-(qBittorrent-5.0).md index e2efed6..1ba8d51 100644 --- a/WebUI-API-(qBittorrent-5.0).md +++ b/WebUI-API-(qBittorrent-5.0).md @@ -64,6 +64,7 @@ This WebUI API documentation applies to qBittorrent v5.0+. For other WebUI API v 1. [Set torrent upload limit](#set-torrent-upload-limit) 1. [Set torrent location](#set-torrent-location) 1. [Set torrent name](#set-torrent-name) + 2. [Set torrent comment](#set-torrent-comment) 1. [Set torrent category](#set-torrent-category) 1. [Get all categories](#get-all-categories) 1. [Add new category](#add-new-category) @@ -2280,6 +2281,32 @@ HTTP Status Code | Scenario 409 | Torrent name is empty 200 | All other scenarios +## Set torrent comment ## + +Requires knowing the torrent hash. You can get it from [torrent list](#get-torrent-list). + +```http +POST /api/v2/torrents/setComment HTTP/1.1 +User-Agent: Fiddler +Host: 127.0.0.1 +Cookie: QBIT_SID_=your_sid +Content-Type: application/x-www-form-urlencoded +Content-Length: length + +hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&comment=This%20is%20a%20comment +``` + +`hashes` can contain multiple hashes separated by `|` or set to `all` + +`comment` is the torrent comment you want to set. + +**Returns:** + +HTTP Status Code | Scenario +----------------------------------|--------------------- +404 | Torrent hash is invalid +200 | All other scenarios + ## Set torrent category ## Requires knowing the torrent hash. You can get it from [torrent list](#get-torrent-list). From 73889bde5415657e39ccb3faa8bf0f355f9a7363 Mon Sep 17 00:00:00 2001 From: IreuN Date: Wed, 6 May 2026 08:56:14 +0200 Subject: [PATCH 2/2] Fix cookie prefix in setComment API example --- WebUI-API-(qBittorrent-5.0).md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebUI-API-(qBittorrent-5.0).md b/WebUI-API-(qBittorrent-5.0).md index 1ba8d51..93d22f7 100644 --- a/WebUI-API-(qBittorrent-5.0).md +++ b/WebUI-API-(qBittorrent-5.0).md @@ -2289,7 +2289,7 @@ Requires knowing the torrent hash. You can get it from [torrent list](#get-torre POST /api/v2/torrents/setComment HTTP/1.1 User-Agent: Fiddler Host: 127.0.0.1 -Cookie: QBIT_SID_=your_sid +Cookie: QBT_SID_=your_sid Content-Type: application/x-www-form-urlencoded Content-Length: length