Skip to content

API Reference

Decypharr provides a REST API for programmatic access.

Include API token in Authorization header:

Terminal window
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
http://localhost:8282/api/torrents

Get API token from SettingsAuth after login.

Get Decypharr version.

Terminal window
curl http://localhost:8282/version

Response:

{
"version": "1.0.0"
}

Get current configuration.

Terminal window
curl -H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/config

Update configuration.

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{"log_level": "debug"}' \
http://localhost:8282/api/config

List all torrents.

Terminal window
curl -H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/torrents

Query Parameters:

  • category: Filter by category
  • hash: Get specific torrent

Add torrent or NZB.

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-F "file=@file.torrent" \
http://localhost:8282/api/add

Or with URL:

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-d '{"url": "magnet:?xt=..."}' \
http://localhost:8282/api/add

Delete torrent(s).

Terminal window
curl -X DELETE \
-H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/torrents?category=sonarr&hash=abc123

Trigger repair scan.

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/repair

List repair jobs.

Terminal window
curl -H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/repair/jobs

Process specific repair job.

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/repair/jobs/JOB_ID/process

List connected Arrs.

Terminal window
curl -H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/arrs

Regenerate API token.

Terminal window
curl -X POST \
-H "Authorization: Bearer OLD_TOKEN" \
http://localhost:8282/api/refresh-token

Response:

{
"api_token": "NEW_TOKEN"
}

Decypharr implements QBitTorrent Web API for Arr compatibility.

Login (compatibility endpoint).

Terminal window
curl -X POST \
-d "username=admin&password=pass" \
http://localhost:8282/api/v2/auth/login

List torrents (QBit format).

Terminal window
curl -H "Authorization: Bearer TOKEN" \
http://localhost:8282/api/v2/torrents/info

Add torrent (QBit format).

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-F "urls=magnet:?xt=..." \
-F "category=sonarr" \
http://localhost:8282/api/v2/torrents/add

Delete torrents (QBit format).

Terminal window
curl -X POST \
-H "Authorization: Bearer TOKEN" \
-d "hashes=hash1|hash2" \
http://localhost:8282/api/v2/torrents/delete

Hierarchical file browsing (WebDAV-style).

List root groups (__all__, __bad__, categories).

List torrents in group.

List files in torrent.

Download specific file.

{
"error": "Error message",
"code": 400
}

Status Codes:

  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized (invalid token)
  • 404: Not Found
  • 500: Internal Server Error

API respects Debrid provider rate limits configured in config.json. No additional API rate limiting.

import requests
TOKEN = "your_api_token"
BASE_URL = "http://localhost:8282"
headers = {"Authorization": f"Bearer {TOKEN}"}
# List torrents
r = requests.get(f"{BASE_URL}/api/torrents", headers=headers)
torrents = r.json()
# Add torrent
r = requests.post(
f"{BASE_URL}/api/add",
headers=headers,
json={"url": "magnet:?xt=..."}
)
const TOKEN = 'your_api_token';
const BASE_URL = 'http://localhost:8282';
const headers = {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json'
};
// List torrents
fetch(`${BASE_URL}/api/torrents`, { headers })
.then(r => r.json())
.then(data => console.log(data));
// Add torrent
fetch(`${BASE_URL}/api/add`, {
method: 'POST',
headers,
body: JSON.stringify({ url: 'magnet:?xt=...' })
});