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

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

- `autoManaged` (boolean) — Automatic management: the save path and incomplete folder follow the category. Absent follows the autoManagement setting.
- `category` (string)
- `contentLayout` (string) — Original keeps the torrent's own layout, Subfolder puts a single file in a folder, NoSubfolder drops the top folder.
- `downloadLimit` (integer<int64>) — Ignored: piecemeal has no per-torrent speed limits. Use the global limits.
- `firstLastPiece` (boolean)
- `inactiveSeedingTimeLimit` (integer<int64>) — Minutes.
- `incompletePath` (string) — Where the data stays until the torrent completes; empty for none. Absent follows the category, then the global setting. Ignored when automatically managed.
- `magnet` (string) — A magnet URI.
- `name` (string) — Display name instead of the torrent's own.
- `ratioLimit` (number<double>)
- `savePath` (string) — Where the data goes; absent uses the category's save path, then the default. Ignored when automatically managed.
- `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.
- `sequential` (boolean)
- `skipChecking` (boolean) — Trust data already on disk instead of verifying it.
- `stopped` (boolean) — Add without starting; defaults to the addStopped setting.
- `tags` (string[] | null)
- `torrentFile` (string) — The .torrent file, base64.
- `uploadLimit` (integer<int64>) — Ignored: piecemeal has no per-torrent speed limits. Use the global limits.
- `url` (string) — An http(s) URL of a .torrent file, or one that redirects to a magnet URI.

Request body example:

```json
{
  "autoManaged": true,
  "category": "string",
  "contentLayout": "Original",
  "downloadLimit": 0,
  "firstLastPiece": true,
  "inactiveSeedingTimeLimit": 0,
  "incompletePath": "string",
  "magnet": "string",
  "name": "string",
  "ratioLimit": 0.1,
  "savePath": "string",
  "seedGoalAction": "default",
  "seedGoalMode": "default",
  "seedingTimeLimit": 0,
  "sequential": true,
  "skipChecking": true,
  "stopped": true,
  "tags": [
    "string"
  ],
  "torrentFile": "string",
  "uploadLimit": 0,
  "url": "string"
}
```

**Responses**

- `201` — Created
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `422` — Unprocessable Entity
- `500` — Internal Server Error

Response example, 201:

```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
}
```
