API Reference
Decypharr provides a REST API for programmatic access.
Authentication
Section titled “Authentication”Include API token in Authorization header:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \ http://localhost:8282/api/torrentsGet API token from Settings → Auth after login.
Endpoints
Section titled “Endpoints”GET /version
Section titled “GET /version”Get Decypharr version.
curl http://localhost:8282/versionResponse:
{ "version": "1.0.0"}GET /api/config
Section titled “GET /api/config”Get current configuration.
curl -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/configPOST /api/config
Section titled “POST /api/config”Update configuration.
curl -X POST \ -H "Authorization: Bearer TOKEN" \ -H "Content-Type: application/json" \ -d '{"log_level": "debug"}' \ http://localhost:8282/api/configGET /api/torrents
Section titled “GET /api/torrents”List all torrents.
curl -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/torrentsQuery Parameters:
category: Filter by categoryhash: Get specific torrent
POST /api/add
Section titled “POST /api/add”Add torrent or NZB.
curl -X POST \ -H "Authorization: Bearer TOKEN" \ -F "file=@file.torrent" \ http://localhost:8282/api/addOr with URL:
curl -X POST \ -H "Authorization: Bearer TOKEN" \ -d '{"url": "magnet:?xt=..."}' \ http://localhost:8282/api/addDELETE /api/torrents
Section titled “DELETE /api/torrents”Delete torrent(s).
curl -X DELETE \ -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/torrents?category=sonarr&hash=abc123POST /api/repair
Section titled “POST /api/repair”Trigger repair scan.
curl -X POST \ -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/repairGET /api/repair/jobs
Section titled “GET /api/repair/jobs”List repair jobs.
curl -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/repair/jobsPOST /api/repair/jobs/{id}/process
Section titled “POST /api/repair/jobs/{id}/process”Process specific repair job.
curl -X POST \ -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/repair/jobs/JOB_ID/processGET /api/arrs
Section titled “GET /api/arrs”List connected Arrs.
curl -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/arrsPOST /api/refresh-token
Section titled “POST /api/refresh-token”Regenerate API token.
curl -X POST \ -H "Authorization: Bearer OLD_TOKEN" \ http://localhost:8282/api/refresh-tokenResponse:
{ "api_token": "NEW_TOKEN"}QBitTorrent API
Section titled “QBitTorrent API”Decypharr implements QBitTorrent Web API for Arr compatibility.
POST /api/v2/auth/login
Section titled “POST /api/v2/auth/login”Login (compatibility endpoint).
curl -X POST \ -d "username=admin&password=pass" \ http://localhost:8282/api/v2/auth/loginGET /api/v2/torrents/info
Section titled “GET /api/v2/torrents/info”List torrents (QBit format).
curl -H "Authorization: Bearer TOKEN" \ http://localhost:8282/api/v2/torrents/infoPOST /api/v2/torrents/add
Section titled “POST /api/v2/torrents/add”Add torrent (QBit format).
curl -X POST \ -H "Authorization: Bearer TOKEN" \ -F "urls=magnet:?xt=..." \ -F "category=sonarr" \ http://localhost:8282/api/v2/torrents/addPOST /api/v2/torrents/delete
Section titled “POST /api/v2/torrents/delete”Delete torrents (QBit format).
curl -X POST \ -H "Authorization: Bearer TOKEN" \ -d "hashes=hash1|hash2" \ http://localhost:8282/api/v2/torrents/deleteBrowse API
Section titled “Browse API”Hierarchical file browsing (WebDAV-style).
GET /api/browse/
Section titled “GET /api/browse/”List root groups (__all__, __bad__, categories).
GET /api/browse/{group}
Section titled “GET /api/browse/{group}”List torrents in group.
GET /api/browse/{group}/{torrent}
Section titled “GET /api/browse/{group}/{torrent}”List files in torrent.
GET /api/browse/download/{torrent}/{file}
Section titled “GET /api/browse/download/{torrent}/{file}”Download specific file.
Error Responses
Section titled “Error Responses”{ "error": "Error message", "code": 400}Status Codes:
200: Success400: Bad Request401: Unauthorized (invalid token)404: Not Found500: Internal Server Error
Rate Limiting
Section titled “Rate Limiting”API respects Debrid provider rate limits configured in config.json. No additional API rate limiting.
Examples
Section titled “Examples”Python
Section titled “Python”import requests
TOKEN = "your_api_token"BASE_URL = "http://localhost:8282"
headers = {"Authorization": f"Bearer {TOKEN}"}
# List torrentsr = requests.get(f"{BASE_URL}/api/torrents", headers=headers)torrents = r.json()
# Add torrentr = requests.post( f"{BASE_URL}/api/add", headers=headers, json={"url": "magnet:?xt=..."})JavaScript
Section titled “JavaScript”const TOKEN = 'your_api_token';const BASE_URL = 'http://localhost:8282';
const headers = { 'Authorization': `Bearer ${TOKEN}`, 'Content-Type': 'application/json'};
// List torrentsfetch(`${BASE_URL}/api/torrents`, { headers }) .then(r => r.json()) .then(data => console.log(data));
// Add torrentfetch(`${BASE_URL}/api/add`, { method: 'POST', headers, body: JSON.stringify({ url: 'magnet:?xt=...' })});