---
search:
  tags:
    - Torrents
    - PATCH
seo:
  description: >-
    Change a torrent. Reference for the PATCH /torrents/{hash} endpoint in the
    piecemeal API.
sidebar:
  label: Change a torrent
  badge: PATCH
title: Change a torrent
type: openapi-operation
---
`PATCH /torrents/{hash}`

**Request body** (`application/json`, required)

- `autoManaged` (boolean) — On moves the torrent to its category's paths; off keeps it where it is.
- `category` (string) — Empty removes the category.
- `comment` (string) — Replaces the comment shown for the torrent; the torrent file is unchanged.
- `downloadLimit` (integer<int64>) — Ignored: piecemeal has no per-torrent speed limits. Use the global limits.
- `firstLastPiece` (boolean)
- `forced` (boolean)
- `inactiveSeedingTimeLimit` (integer<int64>) — Minutes. -2 follows the category, then the global setting; -1 is unlimited.
- `incompletePath` (string) — Where the data stays until the torrent completes; empty for none. Data still in the old folder moves. Turns automatic management off.
- `name` (string)
- `ratioLimit` (number<double>) — -2 follows the category, then the global setting; -1 is unlimited.
- `savePath` (string) — Moves the data there in the background; the state is moving until it's done. A torrent still in its incomplete folder moves there once complete. Turns automatic management off.
- `seedGoalAction` (string) — What happens when the torrent reaches its seeding goals; default follows the category, then the global setting.
- `seedGoalMode` (string) — Whether any goal or all of them must be met; default follows the category, then the global setting.
- `seedingTimeLimit` (integer<int64>) — Minutes. -2 follows the category, then the global setting; -1 is unlimited.
- `sequential` (boolean)
- `stopped` (boolean)
- `tags` (string[]) — Replaces the torrent's tags.
- `uploadLimit` (integer<int64>) — Ignored: piecemeal has no per-torrent speed limits. Use the global limits.

Request body example:

```json
{
  "autoManaged": true,
  "category": "string",
  "comment": "string",
  "downloadLimit": 0,
  "firstLastPiece": true,
  "forced": true,
  "inactiveSeedingTimeLimit": 0,
  "incompletePath": "string",
  "name": "string",
  "ratioLimit": 0.1,
  "savePath": "string",
  "seedGoalAction": "default",
  "seedGoalMode": "default",
  "seedingTimeLimit": 0,
  "sequential": true,
  "stopped": true,
  "tags": [
    "string"
  ],
  "uploadLimit": 0
}
```

**Responses**

- `200` — OK
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error

Response example, 200:

```json
{
  "activeTime": 0,
  "addedAt": 0,
  "autoManaged": true,
  "category": "string",
  "comment": "string",
  "complete": true,
  "completed": 0,
  "completedAt": 0,
  "contentLayout": "Original",
  "contentPath": "string",
  "createdAt": 0,
  "createdBy": "string",
  "downloadRate": 0,
  "downloaded": 0,
  "error": "string",
  "eta": 0,
  "firstLastPiece": true,
  "forced": true,
  "hasMetadata": true,
  "hash": "string",
  "inactiveSeedingTimeLimit": 0,
  "incompletePath": "string",
  "lastActivityAt": 0,
  "magnet": "string",
  "multiFile": true,
  "name": "string",
  "peers": 0,
  "pieceSize": 0,
  "pieces": 0,
  "piecesHave": 0,
  "private": true,
  "progress": 0.1,
  "queuePosition": 0,
  "ratio": 0.1,
  "ratioLimit": 0.1,
  "rootPath": "string",
  "savePath": "string",
  "seedGoalAction": "default",
  "seedGoalMode": "default",
  "seedGoals": {
    "action": "stop",
    "inactiveSeedingTimeLimit": 0,
    "mode": "any",
    "ratioLimit": 0.1,
    "seedingTimeLimit": 0
  },
  "seedingTime": 0,
  "seedingTimeLimit": 0,
  "seeds": 0,
  "sequential": true,
  "sessionDownloaded": 0,
  "sessionUploaded": 0,
  "size": 0,
  "state": "metadata",
  "stopped": true,
  "swarmPeers": 0,
  "tags": [
    "string"
  ],
  "totalSize": 0,
  "tracker": "string",
  "trackers": 0,
  "uploadRate": 0,
  "uploaded": 0
}
```
