# Authentication (/docs/authentication)

## API key [#api-key]

Your API key is on your [TorBox settings page](https://torbox.app/settings) under **API key**. Copy it, or
refresh it to get a new one. The key gives full access to your account, so keep it out of source control and
client-side code.

## Bearer header [#bearer-header]

Most endpoints take the key in the `Authorization` header:

```http
Authorization: Bearer <your api key>
```

Use [Get User Data](/operations/get_user_data) to verify your key.

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.user.get_user_data()
print(result)
```

[View endpoint](/operations/get_user_data)

A missing key is answered with `401 NO_AUTH`, a wrong one with `401 BAD_TOKEN`. A good key that is not allowed to
do something (for example because of the plan) gets `403`. See [Errors](/docs/errors).

## `token` query parameter (download links) [#token-query-parameter-download-links]

The download link endpoints (`/torrents/requestdl`, `/usenet/requestdl`, `/webdl/requestdl` and their `/batch`
variants) take the key as the `token` query parameter instead:

```text
https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true
```

With `redirect=true` this URL works as a permalink that redirects to the CDN link. To invalidate such
permalinks, reset your API key or delete the item from your dashboard.

<Callout type="warn">
A URL with `token=` contains your key. Share it only with people you would give your key to.
</Callout>

## Device code flow [#device-code-flow]

For TVs and other devices where typing a key is hard, apps can obtain a user's key with the device code flow
(`GET /v1/api/user/auth/device/start`, then `POST /v1/api/user/auth/device/token`). The steps are described on
[Start Device Code Authorization](/operations/start_device_code_authorization_process) and [Get Token From Device Code](/operations/get_token_from_device_code_process).

## Sign in with TorBox (OAuth) [#sign-in-with-torbox-oauth]

TorBox runs an OAuth 2.0 authorization server for MCP clients and other apps:

| | |
| --- | --- |
| Metadata | `https://api.torbox.app/.well-known/oauth-authorization-server` |
| Client registration | `POST https://api.torbox.app/register` (RFC 7591) |
| Authorization | `https://api.torbox.app/authorize` (authorization code, PKCE `S256` required) |
| Token | `POST https://api.torbox.app/token` |

The user approves the request on [torbox.app/oauth/device](https://torbox.app/oauth/device). The access token you
receive **is the user's API key**: there is no refresh token and it does not expire. Use it exactly like a key,
in the `Authorization: Bearer` header.

### Signing in on this site [#signing-in-on-this-site]

The **Sign in with TorBox** button in the header uses that same flow. After you approve, this site:

- keeps your key only in an encrypted, `httpOnly` session cookie (never in `localStorage`), and never logs it,
- fills it into the [API reference](/reference) playground, so "Send" runs requests against **your** account,
- forgets it when you click **Sign out** (the cookie is deleted).

**Resetting your API key in the [TorBox settings](https://torbox.app/settings) revokes it everywhere**, including
this site and every app you approved. Signing out here only deletes this site's copy.

The docs are fully readable without signing in.

# Changelog (/docs/changelog)

[View the full TorBox changelog](https://torbox.app/changelog)

## [v9.3.1](https://torbox.app/changelog#v931)

November 9, 2026

### Web Downloads

* Fixes Mediafire downloads

* Fixes [Transfer.it](https://Transfer.it) downloads

* Adds Akirabox downloader

* Adds ZeroFs downloader

### Service

* Makes uncached torrent downloads more reliable during processing due to an edge case being fixed.

### API

* Adds `files` and `active` boolean parameters to `/mylist` endpoints, allowing you to request files being in the response or not, and filtering the request by showing only `active` downloads. [API DOCS](https://api-docs.torbox.app/#8fa2961a-da1e-410e-84c3-821b3f6b30cc).

### Website

* Switches sensitive actions (Delete all downloads, Delete account) buttons from Long Press to multiple click. There were a few device based issues, regarding the long click, as well as people still "accidentally" deleting.

* Handles an edge case where a user would be signed out, but the app never detected it. In some cases this can still happen, all it requires is a refresh, and some requests will prompt you to refresh your page if so.

* Editing a download has improved UI as well as tags being easier to add. All of your tags are now accessible, and you can type new ones in the text area.

## [v9.3](https://torbox.app/changelog#v93)

November 4, 2026

We have been busy! The past few months we have been getting many complaints about “buffering", “slow downloads”, or “connection issues”, and at first we assumed it was user’s internet being slow or bad codecs or something else, since nobody on our team could reproduce, but eventually we decided to actually look into it, rather than just throwing more CDNs at it.

We set up full monitoring on the CDNs viewing every byte that went out of our storage, through the CDN and to the end user (privacy respecting of course), and the amount of data we had, and what we found was crazy. Our monitoring revealed that most complaints were valid, and we were wrong for simply assuming otherwise, and for that we apologise.

The next few weeks we worked tirelessly improving things, finding optimizations, reorganizing, and changing things internally to improve things. Mainly, the issue was our storage servers. Take a look at the below to see how our CDNs work.

```
Storage Server --------------> CDN Server --> User
                 Longer Path         Shorter Path
```

What we found was that while we were assuming the path from the CDN Server to the User was the slow part, what we found was that the Storage Server to the CDN Server was the slow part, and that might seem obvious based on the fact that it’s longer, but because we hyper optimized these paths, we simply assumed that it wasn’t an issue. Now, that’s not really the whole story either, lets walk through how “stalling” works (also known as buffering).

When we serve you a file, your download speed sets the pace. If you’re pulling 10 MB/s from a CDN server, that CDN server pulls the file from the Storage Server at 10 MB/s too. This is the most efficient way to do it, because we never fetch more data than you need.

The problem comes when the Storage Server briefly falls below that speed, say to 5 MB/s (we’ll explain why below). Then you only get 5 MB/s. Sometimes that’s fine, but for many clients it means the file starts buffering. This was the main cause of the complaints: for a split second, the Storage Server delivered a little less data than expected. We call this a “stall.” A stall affects every user pulling from that Storage Server at that moment, and it isn’t limited to peak hours. We saw stalls at every hour of the day, every day.

Let’s first go over why stalls happen:

1. **Disk I/O.** All of our Storage Servers run on hard drives. That’s usually fine, but the drive’s read head has to physically jump between different parts of the disk. While it does, the CPU sits waiting for the data it asked for, which is called I/O wait.

2. **The client stops pulling data.** This is usually because the user paused or stopped the download, or because of an issue on their end.

The first cause is extremely hard to solve, because we can’t move everything onto SSDs without going broke. So while we kept working on it, we built a way to hide stalls from users instead of making them deal with it. The idea is simple: pull more data than you’re asking for.

If the CDN pulls at 100 MB/s while you download at 10 MB/s, it builds up 90 MB of buffer every second. That’s enough to cover a 9-second Storage Server stall without you noticing. Users almost always keep downloading a file once they’ve started it, so the CDN can safely read ahead and hold that extra data for a short time. If the Storage Server stalls, you’re served from the buffer until it recovers. Of course, if the stall lasts longer than the buffer on the CDN has, then you will still run into issues, but this is just made more rare.

This was an instant success, Stalls per thousand streams served went from roughly 8 to 0.2. In this case we categorize a stream as a chunk of any download request through the CDN. This was a improvement of nearly 97.5%, or 40x improvement. There are more improvements on the way, and we have so many ideas. More to come, TorBox still has so much headroom to optimize.

### Service

* Reduced buffering by over 40x (97.5% improvement)

* Reduced TTFB by an impressive amount.

  * Mean: from 172ms → 139ms (19% reduction)

  * p90: from 406ms → 321ms (21% reduction)

  * p99: from 899ms → 875ms (3% reduction)

  * This is just the average across all CDNs, some improved more, some improved less.

* Reduced “hot file” congestion.

* Reduced playback stalls on clients that pull in short bursts.

* Stronger pause/resume performance for high RTT clients.

* Makes downloading from Cloudflare more reliable, and reduced errors through this CDN.

* Overall improved performance across all CDNs and services, with higher throughput per file.

### Website

* A website update no longer is able to send you to an error page due to un-cached assets. Now the website will handle this automatically, preventing any errors from spawning due to this case.

  * If you are out of the tab and return, you may get a notification asking you to reload your page due to a new update.

* Makes logging in more reliable.

* Web Player now shows chapter markers if they are found.

* Fixed .torrent and .nzb files appearing greyed out in the iOS file picker on devices without a torrent or file manager app installed.

* When updating a setting, errors out, the detail of the error is more visible.

* Makes device linking show the currently logged in account, redirects to login and back when signed out to prevent linking not being linked to an account.

* Makes Discord and Telegram linking more reliable, and less confusing due to the page never updating.

* Makes logging in with Google and Apple more reliable, and less confusing due to no errors being shown.

* Copying all download links for a download is now extremely fast and efficient thanks to the new `/requestdl/batch` endpoints.

* The globe at <https://torbox.app/about> is now accurate to the actual data locations (CDN and users) that TorBox serves.

* Moves changelog from <https://torbox.featurebase.app> to <https://torbox.app/changelog>, allowing us to update the design, provide more features, and save money, allowing us to put it towards our core services.

### API

* Fixes linking with Discord for users who linked multiple TorBox accounts to a single Discord account.

* Fixes linking Telegram for users who linked multiple TorBox accounts to a single Telegram account.

* More reliable Device Code linking with better user facing errors, so failures are more understood.

* Adds a rate limit of 30/minute per device code to the `/user/auth/device/start` endpoint.

* Adds a rate limit of 10/minute per user to the `/user/auth/device/check` endpoint.

* Fixes edge case with adding torrents which have a hybrid hash. Also makes adding torrents more reliable.

* General optimization and bug fixes. With this the API is more performant and more reliable than before.

* Makes creating transcoding streams more reliable.

* Updates the `/changelogs/json` and `/changelogs/rss` endpoints to now support offset and limits so that they don't load too much data, since the data is very large. [API DOCS](https://api-docs.torbox.app/#93e8360e-5050-4fd8-aec8-412ead2d5392).

* Adds new `/requestdl/batch` endpoints which allow for requesting multiple file IDs in a single request, speeding things up. No longer do you have to iterate through all file IDs in the download to get all links. [API DOCS](https://api-docs.torbox.app/#cb565a7c-7f5b-45e7-b099-530566904453).

* Improved reliability, and security.

### Web Downloads

* Fixes Bunkr downloads.

* Fixes Hubdrive downloads.

* Fixes Hubcloud downloads.

* Makes FileQ downloads more reliable.

* Fixes Filer downloads.

* Makes the Web Downloader service more reliable.

* Limits DailyUploads downloads to 5 per day, with a total daily bandwidth limit of 20GB.

* Fixes Hitfile downloads.

* Fixes Uploady downloads.

* Fixes DailyUploads downloads.

* Disables Katfile downloads.

* Makes Telegram downloads more reliable.

* Adds Up4Ever downloader.

* Fixes Datanodes downloader.

* Fixes Scribd downloader.

* Makes Turbobit downloads more reliable.

### Telegram Bot

* Makes payment via Telegram stars less failure bound.

* Makes Telegram Bot more responsive.

* Downloads now get download status and loader animation when added via the Telegram bot.

* Downloads are now more reliable when added via the TorBox API (rather than the Telegram bot).

* Prevents crashes in edge cases.

### Transcoding Server

* Prevents the transcoder from picking images embedded in video.

* Fixes chapter generation to match the [WebVTT spec](https://www.w3.org/TR/webvtt1/).

* More reliable transcoder. Streams will no longer be sent to busy servers.

* Can now transcode bitmap-based subtitles. These aren't common, but a few users mentioned it, so we decided to just add them.

* Users can now only transcode one file at a time. This is to prevent abuse and because transcoding is so heavy on the servers, this was causing issues.

### WebDAV

* The WebDAV is more efficient and has less transient failures.

* Listing files and directories are much faster, in some cases over 8x faster.

### T3

* T3 is now more efficient and has less transient failures.

* Listing files and directories are much faster, in some cases over 8x faster.

## [v9.2](https://torbox.app/changelog#v92)

August 17, 2026

### Website

* Creating an account now properly requires you to agree to our Terms of Service as well as our Privacy Policy.

* When signing up with a referral code, upon account creation, the code is automatically added to your account.

* When signing up, you have the option to subscribe to two different types of marketing emails.

  * The first email is for “New features and updates”, which are sent about once a month, or when we have a new update or feature to release.

  * The second email is for “Deals and promotions”, which is general marketing. We send these when we have a new deal, or promotion, or have something general to email you about.

  * These are both completely optional and not required. You are also able to easily unsubscribe from the [settings page](https://torbox.app/settings?section=notifications), or when you get one of these emails.

* You can now subscribe and unsubscribe from the different type of marketing emails in the [settings page](https://torbox.app/settings?section=notifications). The Notifications Settings page is now also split up into two different sections, transactional emails, which are for general notifications relating to downloads, payments and others; and marketing, which is for updates about the platform in general, and not relating to your account.

### Service

* The TorBox CDN gains over 30% performance increase, including single connection speed, multi-connection speed, ramp up speed, seek speed and TTFB (time to first byte), which should all improve how fast your downloads begin.

* Files should now be more compatible with all video player software to prevent infinite loading in some cases with specific files with specific video players.

### API

* The API was further optimized across multiple calls, including any route that accepts authentication, saving around 20ms per request, adding up to thousands of hours of CPU time saved over the course of a year, for a single optimization. More routes were optimized to stack savings, as well.

### Web Downloads

* Optimizes Telegram downloads providing up to 3x more download speed than previously.

* Optimizes Mega downloads providing more than 4x more download speed than previously.

* Fixes Datavaults downloads.

* Makes YouTube downloads more reliable.

* Makes HubDrive downloads more reliable.

* Adds Discord downloader. Accepts Discord cdn links.

  * This was needed for the Discord bot, read below.

* Fixes and re-enables the Katfile downloader.

* Fixes and re-enables the Fileq downloader.

* Fixes and re-enables the Sharemods downloader.

* Fixes and re-enables the MegaUp downloader.

* Fixes and re-enables the DailyUploads downloader.

* Fixes and re-enables the Buzzheavier downloader.

* Fixes the Fuckingfast downloader.

### Discord Bot

* The Discord bot now accepts files in DMs. Simply send a file to the Discord bot directly, and the file will be added to your TorBox account.

* Discord bot link button takes you directly to the login screen so you can link your TorBox and Discord accounts without much navigating.

### Telegram Bot

* The Telegram bot now accepts files directly. Simply forward or send a file to the Telegram bot and the file will be added to your TorBox account.

## [v9.1](https://torbox.app/changelog#v91)

July 31, 2026

### T3

* Fixes random 403 errors on HEAD/GET.

* Allows [v4a authentication](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html).

  * This now means T3 supports all authentication types available.

* Lists more than 10k items.

  * If you have more than 10k torrents, it will now show all of them.

### WebDAV

* Lists more than 10k items.

  * If you have more than 10k torrents, it will now show all of them.

### API

* The API was rewritten to be fully async, which means less timeout errors, and better reliability.

* Download links are now much faster, going from best case scenario of \~300ms → \~150ms, a 100% increase from before! This is definitely a noticeable increase.

### Website

* Adds Greek, Vietnamese, and Thai languages to available preferred subtitle and audio languages in the web player settings.

### Web Downloads

* Fixes AnnasArchives downloads.

* Adds Telegram downloader. Simply copy a message link which contains media and paste it into TorBox, and it will begin downloading!

* Adds TransferNow downloader. Supports folders as well as password protected files.

* Fixes Filer downloads.

* Fixes issues with Mega folder downloads size not being properly counted.

* Makes large 1Fichier downloads more reliable.

* Fixes unreliable YouTube downloads.

* Fixes HubCloud downloads.

* Fixes Vikingfile downloads in some cases.

* Pixeldrain now skips undownloadable files rather than marking the entire list as failed. Pixeldrain also now allows “filesystem” direct downloads.

* Fixes Datavaults downloads.

* Users will no longer be able to submit downloads to the API when the Web Downloader is marked offline, or when that hoster is marked offline.

* Sendnow allows for direct links.

* Fixes Datanodes downloads.

### Transcoding Server

* Improves performance when streaming, meaning better seeking times, less buffering, and more segments instantly available.

### Service

* New policies, located at <https://torbox.app/policies>, which shows our new comprehensive set of policies. Largely TorBox remains unchanged with these new policies, but they were enacted to protect your rights and privacy, as well as our own.

* TorBox main headquarters moves from South Africa to Dubai.

  * This was done due to the instability of the country in the recent times.

* Our AI agents that handle support are much smarter with the ability to access your basic account information such as account plan, days on account, recent transactions, and more.

## [v9](https://torbox.app/changelog#v900-2)

July 1, 2026

Say hello to v9! In this major update we feature major new features such as NNTP, AirLock, and T3. We also fix recent bugs, as well as update parts of our systems which needed it. With the WebDAV and T3 we added more organization with our already existing tags system.

**What is NNTP?**

NNTP is Usenet, but direct. No waiting for TorBox to download the NZB first, and way more software compatibility, such as with SabNZBD, Stremio, NZBGet, and NZBHydra to name a few. This adds way more flexibility with TorBox Pro, where using our existing Usenet may have been difficult, or hard to understand. With our own News Server, it works just like EasyNews and other similar providers, all included in your TorBox Pro subscription! [Read more here](https://support.torbox.app/en/articles/15531672-torbox-news-server).

**What is AirLock?**

AirLock is TorBox’s permanent storage. Currently files are deleted from our system after 30 days of inactivity. With AirLock, you can section specific files to never be deleted from our system, even with no activity on the file! This is huge for users who may not use TorBox constantly, or want to keep specific files locked away to be stored indefinitely. [Read more here](https://support.torbox.app/en/articles/15417147-torbox-airlock).

**What is T3?**

T3 is TorBox’s S3 Compatible integration allowing use with servers, and powerful software, usually reserved for businesses and huge organizations. With T3, you can harness this power with your TorBox files over a protocol meant to mass downloading. This is very similar to our existing WebDAV service. You may not find yourself requiring this software, and it’s not meant for the average user, give it a shot if you want though! [Read more here](https://support.torbox.app/en/articles/15531689-torbox-t3).

### Service

* Allows all countries to subscribe. Our payment provider has lifted our restrictions allowing any user of any country to subscribe.

  * Previously high risk countries were forced to use alternative payment methods. This is no longer the case.

* Changed routing for some CDNs to make them more reliable and faster for specific countries.

* Brings back NNTP News Server. This is TorBox’s very own Usenet provider which you can use in any app that uses Usenet.

  * Read more about it [here](https://support.torbox.app/en/articles/15531672-torbox-news-server), this has a lot more information about the new feature.

* Better abuse protection.

* More reliable service changes, mostly with API changes.

* Fixes RSS feed items where the link redirects to a magnet link.

### API

* Changes /createtorrent rate limit to 300/minute for cached items, and keeps the 60/hour for uncached items, with a total rate limit of 300/minute.

  * Read more [here](https://api-docs.torbox.app/#062b717f-4866-4fc0-a3e6-6e4c2520eefa).

  * /createusenetdownload and /createwebdownload remain unchanged.

* Fixes zip uploads to OneDrive.

* Fixes edge cases with bittorrent v2 hashes.

* Adds routes for getting and using credentials for TorBox News Server. [API DOCS](https://api-docs.torbox.app/#7239bcd1-85ce-481b-b098-1bffb9216137).

* Edit items no longer require the item to be cached to edit.

* Adds “airlocked” boolean when editing downloads to the following routes:

  * `/torrents/edittorrent`. [API DOCS](https://api-docs.torbox.app/#a436204c-b235-4323-91b0-769311740d68).

  * `/usenet/editusenetdownload`. [API DOCS](https://api-docs.torbox.app/#cf0ab144-4e02-4fe7-aaab-738d7073918b).

  * `/webdl/editwebdownload`. [API DOCS](https://api-docs.torbox.app/#d770d5df-390f-4670-b89e-d16e38ff22ba).

* Adds “airlocked” boolean to the following routes:

  * `/torrents/mylist`. [API DOCS](https://api-docs.torbox.app/#8fa2961a-da1e-410e-84c3-821b3f6b30cc).

  * `/usenet/mylist`. [API DOCS](https://api-docs.torbox.app/#b9de037f-fd97-4236-bd11-04535c9fe551).

  * `/webdl/mylist`. [API DOCS](https://api-docs.torbox.app/#3739daf4-b586-4555-80d2-57e5670ee7ca).

### WebDAV

* Allows authentication using API key. Simply pass the username “torbox” with your API key as the password, and you will get access. This can be beneficial for users who want to be able to share their WebDAV access with 3rd parties without sharing sensitive passwords.

* Tags are now shown on the WebDAV. This means that each tag is a folder, and has the downloads marked with that tag inside this folder.

  * This allows for users using Infuse for example, to set the path to their tag to only show items from that tag.

  * Each tag gets its own folder, every item that shares that tag, will be placed inside this folder.

  * Items with multiple tags will be located inside each of those tags.

  * Tagged items can still be found in the root folder.

  * Tagging does not show when “WebDAV Flatten” is enabled, since tags are folders.

### Website

* Lots of small UI/UX changes to make the website easier and feel better to use.

* The “Add Torrent”, “Add NZB” and “Add Web Link” buttons have now all been combined into a “Add Download” button.

  * This new modal will detect the type of item you are adding and label it properly.

  * This makes it a lot easier to use TorBox.

* Adds NNTP News Server credentials section to the [tools page](https://torbox.app/tools). This allows you to easily retrieve your News Server credentials as well as reset your password if necessary.

* Adds Airlock badge. This allows you to see what items are Airlocked. Fancy!

* Adds Airlock filter for Pro users. This allows you to filter what items are Airlocked, to view them quicker and easier. Fancy Fancy!

* Adds Airlock usage in the avatar section. This shows how much Airlocked data you have used, as well as how much you have available total. Fancy Fancy Fancy!

* Fixes MFA QR Code from not scanning properly.

* Adds User ID to settings, underneath the email.

  * Allows copying user ID easily, as well as copying email with a single click.

  * This is used for T3 as well as NNTP, and is a helpful identifier for our support team if they require it.

## [v8.4.5](https://torbox.app/changelog#v845)

May 22, 2026

### Service

* Now tracks bandwidth used from CDNs, Storage, Zips, WebDAV.

  * This coincides with our new abuse policy change where all data sent out of TorBox is now tracked byte-accurately.

  * The same base-line limits still apply, but thanks to our dynamic abuse system, TorBox can still be seen as unlimited, allowing users to download as much as they want. The abuse system will continue to catch the top 0.001% of users on our system.

  * This bandwidth data, is only stored for 30 days, rather than perpetually like before.

    * Better privacy for everyone, and keeps TorBox running better, removing the top users who continue to abuse our systems.

    * This was updated in our [privacy policy](https://github.com/TorBox-App/hosted-privacy_policy).

  * We designed this system to be byte-accurate, but there are some nuances.

    * Buffering may cause you to see slightly more data that you may have actually downloaded. This buffering is done everywhere you use TorBox, to provide with smooth reliability while downloading.

    * For example if you download 500MB of a 1GB file, you may instead see 600MB recorded.

  * You can read more about this here:

    <https://support.torbox.app/en/articles/10336778-the-torbox-abuse-system>

### Website

* Shows a new bandwidth graph which shows the rolling 30 day window of usage to the avatar section.

  * This data is grouped by week, and is updated on your dashboard hourly.

  * This data shows the previous 30 days of the following:

    * Uncached downloads added to TorBox by your API key.

    * Seeding bandwidth from torrents you have added.

    * Bandwidth used from the CDNs.

    * Bandwidth used from the webdav.

    * Bandwidth used from downloading zips.

    * Bandwidth used from uploading files to 3rd party clouds.

* Removes “Total Download" from avatar section.

* Removes “Total Egress” from avatar section.

* Removed stats page.

## [v8.4.4](https://torbox.app/changelog#v844)

May 20, 2026

On the surface, April and May looks like we have been slacking off but in reality, we have been improving old things, and working on new things, revisiting internal systems, as well as building internal tools for our support team to assist you faster and better than before. We are already working on v9, which we will release beginning of Q3 2026, and will take TorBox to the next level, but for now, get used to smaller, less impressive change logs. We promise it will be worth it in the end.

### Website

* Uploads to cloud providers now has it’s own modal, allowing you to easily view your completed uploads.

  * To view this click the “Upload Jobs” button.

    ![](https://imagedelivery.net/wjdNJcfLJD9TRxMb-PzPxw/torbox-changelog-v844-b64u-aW1hZ2UucG5n/public)

* Better handling of playing raw files in the video player.

  * Better handling of “Play Next File”.

* Allows submitting vouchers through URL. Helps when sharing.

* Dashboard is now more responsive when deleting, stop seeding, or adding new downloads.

### Web Downloads

* Makes Mega, ExtMatrix, HubDrive, and HubCloud downloads more reliable.

* More reliable YouTube downloads.

* Fixes Scribd downloads.

### API

* `/webdl/hosters` request now includes a regex pattern that developers can use to match links. [API DOCS](https://api-docs.torbox.app/#0a17f8b0-87a1-459c-b2d9-32d34b00c2ae).

* Fixes edge case when adding Usenet links that have no filename would fail.

* Fixes edge case when adding torrents of the same hash within nano-seconds would cause duplicates to show.

### Stremio Addon

* Disables the Stremio Addon.

### Tinfoil

* Disables the hosted Tinfoil service.

## [v8.4.3](https://torbox.app/changelog#v843)

March 31, 2026

### WebDAV

* Adds searching via web UI for searching through files and folders. Click on the folder/file path in the top right to bring up the search box.

* Adds sorting by name and size.

* Much faster operation. Previously, every time you viewed a folder or file, WebDAV would contact our database, now data is cached on our servers for much faster operation when viewing files or folders.

* Properly announces that the server accepts ranges, and better handles ranged requests.

* More reliable downloads.

* WebDAV now hides downloads over 1000 files large due to performance issues.

### Web Downloads / Debrid

* Fixes 4shared RAR downloads.

* Fixes Turbobit downloads.

* Fixes Twitch downloads.

* Handles cases where Buzzheavier returns an error, instead of caching the file containing the error, TorBox will just error the download.

* Fixes Datanodes downloads.

* Handles log in only [Archive.org](http://Archive.org) downloads by failing them with a proper error rather than something generic.

* Adds downloading from [Castbox.fm](http://Castbox.fm)

  * This allows episodes as well as channel downloads (most recent 50 episodes)

* Adds downloading via the [GalleryDL tool](https://github.com/mikf/gallery-dl). This allows for over 200+ supported websites already added onto TorBox’s Web Downloader system.

  * All of the supported sites can be viewed [here](https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.md) (the [TorBox hosters](https://torbox.app/hosters) page only shows a small fraction of what is supported).

  * These are mostly image-based websites, and now allows for TorBox to fulfill more purposes such as bulk media archiving and makes TorBox a more complete media ingestion tool.

* Fixes YouTube downloads.

* Fixes Vikingfile direct downloads handling.

* Adds downloading from FileQ.

* Adds downloading from HubDrive.

* Adds downloading from DriveSeed.

* Adds downloading from HubCloud.

* Adds downloading from [googleusercontent.com](http://googleusercontent.com) direct links. Some user’s requested this, since some of their sources only provide these links rather than [drive.google.com](http://drive.google.com) links.

* Adds downloading from Filespace.

* Adds downloading from Uploady.

* Adds downloading from Datavaults.

### Website

* When adding a new download fails, the error reason will be more visible, rather than being hidden behind the icons.

* When adding a new download fails, you can now retry it with a single button. This will add it back to the queue.

* Updates the icons on the new downloads panel.

### API

* Better API docs! Our API docs got an upgrade due to completing all the [Postman verification requirements](https://www.postman.com/publish/verification/), which includes full documentation of all available API endpoints, with proper descriptions and responses, meaning that the quality of our API docs meet the stringent requirements of Postman.

  * Fancy checkmark at <https://www.postman.com/torbox>.

  * Our API docs now live on <https://api-docs.torbox.app>, and is no longer a redirect. This does mean that the search API and Relay API may be more difficult to find, so you can find them [here](https://www.postman.com/torbox/torbox-api/overview?sideView=agentMode).

  * The reason we put so much time and effort into this doc quality is because we care highly for our community developers who build software around our API. We are committed to making TorBox the simplest developer experience available.

* Allows changing user settings via API. [API DOCS](https://api-docs.torbox.app/#263427ea-0129-4f59-a0e4-11ef3e9364f4).

* Torrents can have a new state called “Incomplete”. This is added to torrents which never fully download in time due to not having any seeders.

* Makes API more reliable.

## [v8.4.2](https://torbox.app/changelog#v842)

February 18, 2026

Another heavily focused web player update! This nearly completes the web player in terms of features that we are going to add. This also adds a bunch of quality of life updates that many users requested.

### Website

* Web player gets “Up Next” dialogue once you have finished watching a stream.

  * This will stay on your screen until you dismiss it, or perform one of the actions.

  * One of the actions is “Show List” where it will show a list of all video files, including the currently playing file. This currently playing file will be highlighted in TorBox green.

    * Clicking on the name of any file will begin the stream for this file.

    * When clicking on a file, it will keep the same resolution, subtitle and audio settings as currently if available.

  * Clicking on “Play” will play the next up file.

  * This also shows a thumbnail for the next video.

  * Showing this feature can be enabled or disabled in the settings.

  * When clicking play, it will keep the same resolution, subtitle and audio settings as currently if available.

* Web player also gets a post-video screen. This screen will show when your video ends. This shows you a next up, current video information, and file list widgets allowing you to quickly watch the next video, or pick any video you like.

* When going AFK on the web player, it no longer resets the player.

* Adds torrent health check action to active torrents. This may take awhile to gather but will show you the current peers and seeds accurately. This used to be a [tool](https://torbox.app/tools), but now it is built directly into the dashboard for a better user experience and ease of use.

  * With this tool, you can know for sure whether TorBox can see any seeds for this torrent.

* Makes the sort descending by default. This was a problem for users who selected a sort option in the settings and cannot change direction.

* Adds setting for choosing a default web player scrobbling option. This option is off by default.

* Adding torrents now takes a little bit longer, but will show errors if there was a problem when adding the download.

* Adds Re-Download action to inactive downloads. This allows you to automatically re-download failed, inactive, expired, incomplete, or missing downloads.

  * This doesn’t apply to all inactive downloads. [Read here for more information](https://support.torbox.app/en/articles/13875800-re-download-action-in-torbox#h_cca2e12477).

* Adds “Copy Name” tool to all downloads.

* Adds loading indicators to exporting .torrent and copying full magnet.

* Fixes action panel not being fully visible/usable on inactive usenet and web downloads.

### API

* Adds “use_cache_lookup” parameter to the `/torrentinfo` endpoint(s). This allows for quick re-lookups, if you find your users or self requesting the same hashes/magnets/files constantly. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-3c12e03c-1fe2-4cc2-b886-095e4d4c6075?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

* Adds “peers_only” parameter to the `POST` `/torrentinfo` endpoint. If trackers are found in the magnet or torrent file, TorBox will search the trackers for the peers and seeds information which is usually faster than contacting DHT for the information. As soon as all trackers are contacted and data is returned, TorBox will immediately respond with the seeds and peers without attempting to find the torrent name, size and files. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-660e3f57-100a-4689-8b0c-881fa6819e53?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

  * If the “peers_only” parameter is not sent, but trackers are still found, and the attempt to return full metadata fails, TorBox will instead respond with a successful partial response including the `hash`, `trackers`, `seeds` and `peers`, while `name`, `size` and `files` will be null.

  * This can be useful for applications who only want to get a quick look at the peers and seeds rather than requiring all of the information from DHT.

### Search API

* Fixes NZBHydra2 BYOI searches not showing size, indexer, or files.

### Web Downloads/Debrid

* Fixes Twitch downloads.

* Fixes PikPak downloads.

### Service

* Processing of files should now be around 25% faster than before.

## [v8.4.1](https://torbox.app/changelog#v841)

February 18, 2026

### Website

* Allows searching your dashboard by hash, alternative hashes or tags.

* Shows tags in purple on your downloads.

  * You can add these tags by editing the download, or by the API.

* New editor for downloads. This allows you to edit the name of the download, the tags and alternative hashes.

  * This shows a nice preview, so you will see what it will look like on the dashboard.

* Allows filtering your dashboard by your tags. This is useful for only showing specific tags.

* Adds button in Stremio Integration settings for resetting settings back to default.

* Sort, filter and sort icons now change to TorBox’s green color when in use (or different than your preset settings).

### API

* Adding cached downloads should be slightly faster, by roughly 30%.

  * Adding cached usenet downloads got the most improvement by over 200% time savings in most cases.

* Adding a cached download now requests TorBox to generate the download link in the background, saving multiple seconds in most cases when you eventually go to download the resulting file.

  * The science is that most users will immediately download the file after adding it to their account, so we can speed up the process by doing all the hard work in the background, and using the cached link when it is eventually requested.

* Allows editing data about torrents. This allows you to update the name, tags, and alternative hashes on the torrent. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-a436204c-b235-4323-91b0-769311740d68?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

* Allows editing data about usenet downloads. This allows you to update the name, tags, and alternative hashes on the torrent. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-cf0ab144-4e02-4fe7-aaab-738d7073918b?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

* Allows editing data about web downloads. This allows you to update the name, tags, and alternative hashes on the torrent. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-d770d5df-390f-4670-b89e-d16e38ff22ba?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

* Fixes deleting cached downloads. The download would be deleted but would error the request through the API. This has been resolved.

### Web Downloads/Debrid

* Handles Bunkr video links.

* Fixes Extmatrix downloads.

* Handles [Archive.org](http://Archive.org) embed links.

### Search API

* Fixes many bugs.

* Adds the `cached_only` parameter to all search endpoints, which searches only for items already cached on TorBox. [API DOCS](https://www.postman.com/torbox/workspace/torbox/request/29572726-f3b260b6-9c7a-4a94-9c91-91229e933556?action=share\&source=copy-link\&creator=29572726\&ctx=documentation).

# Errors (/docs/errors)

Every error uses the [standard envelope](/docs#the-standard-response) with `success: false`:

```json
{
  "success": false,
  "error": "BAD_TOKEN",
  "detail": "The provided token is invalid.",
  "data": null
}
```

- Branch on **`error`**: it is the stable code. Show **`detail`** to people: it is a user-friendly message.
- `data` is usually `null`. For some errors it holds extra information (for example `UNKNOWN_ERROR`).

## Status codes [#status-codes]

| Status | Meaning |
| --- | --- |
| `200` | Always means success. |
| `400` | The user did something wrong, or an input wasn't correct or expected. |
| `401` | The API token is missing or invalid. |
| `403` | The token is fine but the account is not allowed to do this, for example because of its plan. |
| `404` | What was asked for wasn't found. |
| `409` | It conflicts with something that already exists. |
| `429` | A limit was reached. See [Rate limits](/docs/rate-limits). |
| `500` | Something went wrong on TorBox's end. |
| `503` | A part of TorBox is unavailable for the moment, so the call can be tried again. |

<Callout>
Request validation errors (a missing or mistyped field) are answered with `422` and FastAPI's
`{"detail": [...]}` body, not the envelope.
</Callout>

## Error codes [#error-codes]

A `4xx` status means the request or the account is the cause, a `5xx` status means the fault is on TorBox's
end. A few endpoints send an error with another status than the one listed; their examples in the
[reference](/reference) show which.

| Error code | Status | Meaning |
| --- | --- | --- |
| MISSING_REQUIRED_OPTION | 400 | The API is missing required information to process the request. |
| MISSING_DATA | 400 | The request is missing data that is needed to process it. |
| INVALID_OPTION | 400 | The provided option is invalid. |
| TOO_MANY_OPTIONS | 400 | Client sent too many options. Usually this has to do with the API requiring only 1 option but the client sent more than the required. |
| TOO_MUCH_DATA | 400 | Client sent too much data to the API. Please keep requests under 100MB in size. |
| DOWNLOAD_TOO_LARGE | 400 | This download is oversized for the user's plan. The user is recommended to upgrade their plan to download this file.  <br />  <br />Free Plan Limit: **10737418240** bytes  <br />Essential Plan Limit: **214748364800** bytes  <br />Standard Plan Limit: **214748364800** bytes  <br />Pro Plan Limit: **1099511627776** bytes |
| BOZO_TORRENT | 400 | The torrent sent is not a valid torrent. |
| BOZO_NZB | 400 | The NZB sent is not a valid NZB file. |
| BOZO_FILE | 400 | This file doesn't match the required mimetype. Please use a different file. |
| BOZO_RSS_FEED | 400 | This RSS feed is invalid, not a well-formed XML, or could not be read by TorBox. |
| BOZO_REGEX | 400 | The regex you entered is bad. |
| BOZO_REFERRAL | 400 | The referral code is invalid, or would not give the user any benefit. |
| BAD_CONFIRMATION | 400 | The confirmation code you have given is invalid. |
| UNSUPPORTED_SITE | 400 | The link is from a site that TorBox cannot download from. The supported sites are in the hoster list. |
| URL_NOT_ALLOWED | 400 | The URL given cannot be used. It could not be resolved, or it points somewhere TorBox does not download from. |
| DIFF_ISSUE | 400 | The request parameters sent does not allow for this request to complete. |
| WHY_ARE_YOU_LIKE_THIS | 400 | The user tried to use their own referral code. |
| DEVICE_CODE_NOT_USED | 400 | The user has not authorized this device code yet. Keep polling. |
| DEVICE_CODE_USED | 400 | This device code has already been redeemed. Start the device code process again. |
| OAUTH_VERIFICATION_ERROR | 400 | The server tried verifying your OAuth token, but it was not accepted by the provider. |
| NAME_TOO_SHORT | 400 | The name or tag given is empty. |
| NAME_TOO_LONG | 400 | The name or tag given is 200 characters or longer. |
| INVALID_HASH | 400 | A hash given is not an MD5, SHA1 or SHA256 hash. |
| NO_CHANGES | 400 | The request did not contain anything to change. |
| INVALID_EMAIL | 400 | The email address given is not valid, or is a disposable email address. |
| INVALID_VENDOR_URL | 400 | The URL given for the vendor account is not a valid URL. |
| NO_AUTH | 401 | There are no provided credentials. |
| BAD_TOKEN | 401 | The provided token is invalid. |
| AUTH_ERROR | 403 | The given authentication was checked and not accepted. |
| PLAN_RESTRICTED_FEATURE | 403 | This feature is restricted to users of higher plans. The user is recommended to upgrade their plan to use this endpoint. |
| UPGRADE_REQUIRED | 403 | This feature is not available on the free plan. The user is recommended to upgrade their plan. |
| ITEM_NOT_ALLOWED | 403 | This item or account is not allowed to be used for this request. The reason is in `detail`. |
| VENDOR_DISABLED | 403 | This vendor account has been disabled. Please contact support. |
| AI_DISABLED | 403 | The user has turned off AI features in their settings. |
| ENDPOINT_NOT_FOUND | 404 | If you have hit an endpoint that doesn't exist. |
| ITEM_NOT_FOUND | 404 | The item you queried cannot be found. |
| USER_NOT_FOUND | 404 | The user you queried cannot be found. |
| DOWNLOAD_NOT_CACHED | 404 | The download was sent with `add_only_if_cached` and is not cached, so it was not added. |
| NO_REFERRAL_CODE | 404 | The user does not have a referral code. |
| DUPLICATE_ITEM | 409 | This item already exists. |
| NOT_OWNER | 409 | The item does not exist, or does not belong to the user. |
| USER_EXISTS | 409 | A user with this email address already exists and cannot be used for this request. |
| CONFIRMATION_EXPIRED | 410 | The confirmation code you have given is expired. Request a new code. |
| DEPRECATED | 410 | This endpoint is deprecated. The endpoint to use instead is in `detail`. |
| RATE_LIMIT_EXCEEDED | 429 | Client sent too many requests. The limit that was reached is in `detail`. Read the Rate Limits section above. |
| MONTHLY_LIMIT | 429 | User has hit the maximum monthly limit. It is recommended user upgrade their account to be able to download more. |
| COOLDOWN_LIMIT | 429 | User is on download cooldown. It is recommended user upgrade their account to be able to bypass this restriction. |
| ACTIVE_LIMIT | 429 | User has hit their max active download limit. It is recommended user upgrade their account or purchase addons to bypass this restriction. |
| DOWNLOAD_LIMIT_REACHED | 429 | User has hit the daily limit of downloads for this hoster. The limit resets after 24 hours. |
| DAILY_BANDWIDTH_LIMIT_EXCEEDED | 429 | User has used up the daily bandwidth of their plan. |
| AIRLOCK_LIMIT_REACHED | 429 | The user's Airlock storage is full, or this download would not fit in it. |
| ASSISTANT_DAILY_LIMIT | 429 | User has used up the assistant for today. It resets at 00:00 UTC. |
| ASSISTANT_FREE_LIMIT | 429 | User has used up the assistant messages of the free plan for today. |
| DATABASE_ERROR | 500 | Could not access internal database/memory store information. |
| UNKNOWN_ERROR | 500 | The reason for the error is unknown. Usually there will be error data attached in the "data" key. In these cases please report the request to [contact@torbox.app](mailto:contact@torbox.app). |
| DOWNLOAD_SERVER_ERROR | 500 | There was an error interacting with the download on the download server. It is recommdned to simply wait some time before trying again. |
| DOWNLOAD_METADATA_ERROR | 500 | The full metadata of the torrent could not be downloaded in time. What the trackers answered is in `data`. |
| STORAGE_ERROR | 500 | There was an error with TorBox's internal storage. |
| STREAM_INFO_ERROR | 500 | The information needed to stream this file could not be read. |
| ASSISTANT_ERROR | 500 | There was an error with the assistant. |
| REDIRECT_ERROR | 500 | The server tried redirecting, but it faulted. |
| REGISTRATION_FAILED | 500 | The OAuth link could not be registered. |
| UNREGISTRATION_FAILED | 500 | The OAuth link could not be unregistered. |
| AUTH_UNAVAILABLE | 503 | The token could not be verified right now. This says nothing about the token, so try again shortly. |
| NO_SERVERS_AVAILABLE_ERROR | 503 | There are no download servers available to handle this request. This should never happen. If you receieve this error, please contact us at [contact@torbox.app](mailto:contact@torbox.app). |
| DOWNLOAD_SERVER_OFFLINE | 503 | The download server that holds this download is offline. |
| LINK_OFFLINE | 503 | The link given is inaccessible or has no online files. |
| TEMPORARILY_DISABLED | 503 | The site of this link is temporarily disabled on TorBox. |

# Getting started (/docs/getting-started)

## 1. Get your API key [#1-get-your-api-key]

Open your [TorBox settings page](https://torbox.app/settings) and copy the key from the **API key** section.
Keep it secret: it gives full access to your account. See [Authentication](/docs/authentication).

```bash
export TORBOX_API_KEY="your-api-key"
```

## 2. Check who you are [#2-check-who-you-are]

Use [Get User Data](/operations/get_user_data) to check that your key works. Choose a TorBox SDK or an HTTP
client in the request example to copy code for your language.

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.user.get_user_data()
print(result)
```

[View endpoint](/operations/get_user_data)

Every answer is the [standard envelope](/docs#the-standard-response): `success`, `error`, `detail`, `data`.

## 3. Add a torrent [#3-add-a-torrent]

[`POST /v1/api/torrents/createtorrent`](/operations/create_torrent) takes **either** a magnet link or a torrent file
as form data. Choose **Magnet link** or **Torrent file** in the example.

**Magnet link**

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.create_torrent(magnet="magnet:?xt=urn:btih:YOUR_TORRENT_HASH")
print(result)
```

**Torrent file**

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.create_torrent(file="./ubuntu.torrent")
print(result)
```

[View endpoint](/operations/create_torrent)

```json
{
  "success": true,
  "error": null,
  "detail": "Torrent Added Successfully",
  "data": { "hash": "string", "torrent_id": 0, "auth_id": "string" }
}
```

## 4. List your downloads [#4-list-your-downloads]

Use [Get Torrent List](/operations/get_torrent_list) with `limit=50` to fetch the first page of torrents.

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.get_torrent_list(limit=50)
print(result)
```

[View endpoint](/operations/get_torrent_list)

## 5. Get a download link [#5-get-a-download-link]

Use [Request Torrent Download Link](/operations/request_torrent_download_link) with a `torrent_id` and `file_id`.

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.request_torrent_download_link(torrent_id=123, file_id=0)
print(result)
```

[View endpoint](/operations/request_torrent_download_link)

This endpoint takes the key as the `token` **query parameter**, not as a header, so the URL itself can be used as
a link. See [Torrents](/docs/torrents#download-links).

## Try it in the browser [#try-it-in-the-browser]

The [API reference](/reference) has a playground that calls the real API. Use **Sign in with TorBox** in the
header and your key is filled in for you.

# Introduction (/docs)

The TorBox API is the REST API behind [torbox.app](https://torbox.app). Everything the app does (adding
torrents, usenet and web downloads, streaming, notifications, RSS feeds, integrations) is available to your
code.

- **Base URL:** `https://api.torbox.app`
- **Version:** `v1`, every path starts with `/v1/api/`
- **Spec:** [https://api.torbox.app/openapi.json](https://api.torbox.app/openapi.json) (OpenAPI 3.1), rendered on the
  [API reference](/reference)

## The standard response [#the-standard-response]

Most requests return the same JSON envelope:

```json
{
  "success": true,
  "error": null,
  "detail": "Torrent Added Successfully",
  "data": { "hash": "string", "torrent_id": 0, "auth_id": "string" }
}
```

| Key | Meaning |
| --- | --- |
| `success` | Whether the request was successful. |
| `error` | An error code if there was an error, or `null` on success. See [Errors](/docs/errors). |
| `detail` | A user-friendly message, for success or failure. You may forward it directly to users. |
| `data` | The response information, usually an object, but can be anything. Check the examples in the reference. |

You can rely on both the `success` boolean and the status code. Status `200` always means success.

## General notes [#general-notes]

- The `/usenet` and `/webdl` endpoints are nearly the same as the `/torrents` endpoints, apart from some
  differently named inputs and outputs.
- All outputs are JSON unless otherwise specified.
- All dates are UTC in the format `%Y-%m-%dT%H:%M:%SZ`, for example `2024-10-21T20:47:03Z`.

## Next steps [#next-steps]

<Cards>
<Card title="Getting started" href="/docs/getting-started" />

<Card title="Authentication" href="/docs/authentication" />

<Card title="API reference" href="/reference" />

<Card title="SDKs" href="/docs/sdks" />
</Cards>

# MCP (/docs/mcp)

There are two [Model Context Protocol](https://modelcontextprotocol.io) servers:

| Server | URL | What it does | Auth |
| --- | --- | --- | --- |
| **TorBox API** | `https://api.torbox.app/mcp` | Acts on your account: add and manage downloads, read your list, and more | OAuth sign-in, or `Authorization: Bearer <api key>` |
| **TorBox Docs** | `https://api-docs.torbox.app/mcp` | Searches these docs and the API reference | none (read-only, rate limited) |

Both use the Streamable HTTP transport.

## TorBox API server [#torbox-api-server]

Adding `https://api.torbox.app/mcp` to a client that supports remote MCP servers starts the OAuth sign-in: you
confirm a code on [torbox.app/oauth/device](https://torbox.app/oauth/device) and the client receives your API key
as its token. Clients without OAuth can send the key as a header instead. Resetting your API key in the
[TorBox settings](https://torbox.app/settings) disconnects every client. If AI features are turned off in your
settings, the server answers `403`.

The tools are generated from the API's own routes, so they do exactly what the endpoints in the
[reference](/reference) do.

TorBox also publishes [AI skills](https://github.com/TorBox-App/ai-skills) that teach agents to use the API and
MCP well, and a guide on
[connecting your AI to TorBox](https://support.torbox.app/en/articles/18453973-how-to-connect-your-ai-to-torbox).

## TorBox Docs server [#torbox-docs-server]

Read-only tools for agents that write code against the API:

| Tool | |
| --- | --- |
| `search_docs(query)` | Full-text search over the guides and every API operation |
| `get_page(path)` | A guide or operation page as Markdown, e.g. `/docs/authentication` or `/operations/create_torrent` |
| `list_endpoints()` | Every operation: operation ID, method, path, summary |
| `get_endpoint(operation_id)` | One operation in full: parameters, body, responses |

## Configuration [#configuration]

<Tabs items={["Claude Code","Claude Desktop","Cursor"]}>
<Tab value="Claude Code">
```bash
# TorBox API, with OAuth sign-in
claude mcp add --transport http torbox https://api.torbox.app/mcp

# TorBox API, with an API key instead
claude mcp add --transport http torbox https://api.torbox.app/mcp --header "Authorization: Bearer $TORBOX_API_KEY"

# TorBox Docs
claude mcp add --transport http torbox-docs https://api-docs.torbox.app/mcp
```
</Tab>

<Tab value="Claude Desktop">
In **Settings → Connectors → Add custom connector**, add `https://api.torbox.app/mcp` (you'll be asked to sign
in) and `https://api-docs.torbox.app/mcp`.

Or in `claude_desktop_config.json`, through the `mcp-remote` bridge:

```json
{
  "mcpServers": {
    "torbox": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.torbox.app/mcp"] },
    "torbox-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https://api-docs.torbox.app/mcp"] }
  }
}
```
</Tab>

<Tab value="Cursor">
`~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):

```json
{
  "mcpServers": {
    "torbox": { "url": "https://api.torbox.app/mcp" },
    "torbox-docs": { "url": "https://api-docs.torbox.app/mcp" }
  }
}
```

To use an API key instead of signing in:

```json
{
  "mcpServers": {
    "torbox": {
      "url": "https://api.torbox.app/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```
</Tab>
</Tabs>

## For LLMs [#for-llms]

These docs are also available as plain text: [/llms.txt](/llms.txt) (index of every page and API operation),
[/llms-full.txt](/llms-full.txt) (everything in one file), and any page as Markdown by adding `.md`, e.g.
[/docs/authentication.md](/docs/authentication.md).

# Rate limits (/docs/rate-limits)

Limits are per **API token**, not per IP address (except where noted). There is no edge rate limiting.

| Endpoint | Limit |
| --- | --- |
| Everything not listed below | **300/min** per API token |
| `POST /torrents/createtorrent` | **60/hour** for uncached items, **300/min** for all requests |
| `POST /torrents/asynccreatetorrent` | **60/hour** for uncached items, **300/min** for all requests |
| `POST /usenet/createusenetdownload`, `POST /usenet/asynccreateusenetdownload` | **60/hour** |
| `POST /webdl/createwebdownload`, `POST /webdl/asynccreatewebdownload` | **60/hour** |
| `POST /notifications/test` | **3/hour** |
| `GET /usenet/provider/connection`, `GET /usenet/provider/account`, `POST /usenet/provider/account/resetpw` | **5/sec** |
| `/vendors` endpoints | **1/sec**, except `POST /vendors/register` and `PUT /vendors/updateaccount` (**15/hour**) and `PATCH /vendors/refresh` (default limit) |
| `GET /user/auth/device/start` | **30/min** per **IP address** |
| `POST /assistant/chat` | **5/min** per account |
| `GET /assistant/usage` | **30/min** per account |
| `/assistant/conversations` endpoints | **60/min** per account |

All paths are below `/v1/api`.

## How torrent creation counts [#how-torrent-creation-counts]

`POST /torrents/createtorrent` and `POST /torrents/asynccreatetorrent` each apply two limits.

- **300 requests per minute** per endpoint, including cached and uncached requests.
- **60 uncached torrents per hour** shared across both endpoints.

An uncached submission counts against both limits. For example, adding 250 cached and 50 uncached torrents through
one endpoint in a minute hits its per-minute limit and leaves **10 uncached torrents** across both endpoints for the
rest of the hour.

## When you hit a limit [#when-you-hit-a-limit]

A request over a limit is answered with status `429` and the error `RATE_LIMIT_EXCEEDED`, with the limit that was
reached in `detail`. These headers tell you where you stand:

| Header | |
| --- | --- |
| `X-RateLimit-Limit` | The limit that applies |
| `X-RateLimit-Remaining` | Requests left in the window |
| `X-RateLimit-Reset` | When the window resets |
| `Retry-After` | Seconds to wait before retrying |

Back off until `Retry-After` has passed. The [SDKs](/docs/sdks) retry `429` and `503` for you.

<Callout>
IP whitelisting requests are no longer accepted, because rate limiting is based on the API token, not the IP.
</Callout>

# SDKs (/docs/sdks)

The SDKs are generated from the [OpenAPI spec](https://api.torbox.app/openapi.json) with
[OpenAPI Generator](https://openapi-generator.tech). Releases use the latest public [TorBox changelog](https://torbox.app/changelog)
version followed by the UTC build date. Each SDK wraps the generated client with TorBox-specific behavior.

- **Response envelopes.** Python and TypeScript methods and PHP's `send()` return `data`. Go and Rust validate
  `success` through `torbox.Result` and `torbox::send`. Kotlin, C++, and C# expose `success` on the response model.
- **Errors.** Use the generated HTTP errors in Kotlin, C++, and C#. The other SDKs also provide helpers for
  TorBox error codes and details. In PHP, catch `TorBoxException`.
- **Retries.** Python, TypeScript, Go, and Rust retry `429` and `503` with backoff and honor `Retry-After`.
- **Uploads.** `create_torrent` and `create_usenet_download` accept a file.
- **Download links.** Python and TypeScript add the `token` query parameter. In Go, Rust, PHP, Kotlin, C++, and C#,
  pass your API key as that parameter.

<Callout type="warn">
Single-item lookups such as `mylist?id=...` answer an object while the spec only describes the list, so typed SDKs
cannot parse them yet. Fetch the list and filter until the spec is fixed.
</Callout>

## Install [#install]

These are the SDK releases for TorBox v9.3.1, built on 2026-11-25.

### Python

- Package: `torbox-sdk`, version 9.3.2026112508
- Registry: https://pypi.org/project/torbox-sdk/
- Source code and README: https://github.com/TorBox-App/torbox-sdk-py

```sh
pip install torbox-sdk==9.3.2026112508
```

First request with the Python SDK:

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.user.get_user_data()
print(result)
```

### TypeScript

- Package: `@torbox/torbox-api`, version 9.3.2026112508
- Registry: https://www.npmjs.com/package/@torbox/torbox-api
- Source code and README: https://github.com/TorBox-App/torbox-sdk-js

```sh
npm install @torbox/torbox-api@9.3.2026112508
```

First request with the TypeScript SDK:

```typescript
import { TorBox } from "@torbox/torbox-api";

const client = new TorBox({ apiKey: process.env.TORBOX_API_KEY! });
const result = await client.user.getUserData();
console.log(result);
```

### Go

- Package: `github.com/TorBox-App/torbox-sdk-go/v9`, version 9.3.2026112508
- Source code and README: https://github.com/TorBox-App/torbox-sdk-go

```sh
go get github.com/TorBox-App/torbox-sdk-go/v9@v9.3.2026112508
```

First request with the Go SDK:

```go
package main

import (
    "context"
    "fmt"
    "log"
    "os"

    "github.com/TorBox-App/torbox-sdk-go/v9"
)

func main() {
    ctx := context.Background()
    client := torbox.New(os.Getenv("TORBOX_API_KEY"))
    result, err := torbox.Result(client.UserAPI.GetUserData(ctx).Execute())
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(result.GetData())
}
```

### Rust

- Package: `torbox`, version 9.3.2026112508
- Registry: https://crates.io/crates/torbox
- Source code and README: https://github.com/TorBox-App/torbox-sdk-rs

```sh
cargo add torbox@9.3.2026112508
```

First request with the Rust SDK:

```rust
// cargo add tokio --features macros,rt-multi-thread
use torbox::Client;
use torbox::apis::user_api;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(std::env::var("TORBOX_API_KEY")?);
    let result = torbox::send(user_api::get_user_data(&client.config, Default::default())).await?;
    println!("{:?}", result.data);
    Ok(())
}
```

### PHP

- Package: `torbox/sdk`, version 9.3.2026112508
- Registry: https://packagist.org/packages/torbox/sdk
- Source code and README: https://github.com/TorBox-App/torbox-sdk-php

```sh
composer require "torbox/sdk:9.3.2026112508"
```

First request with the PHP SDK:

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use TorBox\Sdk\TorBox;
use TorBox\Sdk\Api\UserApi;

$client = new TorBox(getenv('TORBOX_API_KEY'));
$result = $client->send(fn () => $client->api(UserApi::class)->getUserData());
print_r($result);
```

### Kotlin

- Package: `app.torbox:torbox-sdk`, version 9.3.2026112508
- Registry: https://central.sonatype.com/artifact/app.torbox/torbox-sdk
- Source code and README: https://github.com/TorBox-App/torbox-sdk-kotlin

```kotlin
repositories { mavenCentral() }
dependencies { implementation("app.torbox:torbox-sdk:9.3.2026112508") }
```

First request with the Kotlin SDK:

```kotlin
import app.torbox.sdk.TorBox
import app.torbox.sdk.apis.UserApi

fun main() {
    val client = TorBox(requireNotNull(System.getenv("TORBOX_API_KEY")))
    val response = client.api(::UserApi).getUserData()
    check(response.success) { response.detail }
    println(response.data)
}
```

### C++

- Package: `torbox-sdk`, version 9.3.2026112508
- Source code and README: https://github.com/TorBox-App/torbox-sdk-cpp

```cmake
include(FetchContent)
FetchContent_Declare(torbox
  GIT_REPOSITORY https://github.com/TorBox-App/torbox-sdk-cpp.git
  GIT_TAG v9.3.2026112508
)
FetchContent_MakeAvailable(torbox)
target_link_libraries(your_app PRIVATE torbox-sdk)
```

First request with the C++ SDK:

```cpp
#include <cstdlib>
#include <iostream>
#include <stdexcept>
#include "api/TorBoxClient.h"
#include "api/UserApi.h"

int main() {
    const auto* key = std::getenv("TORBOX_API_KEY");
    if (key == nullptr) throw std::runtime_error("Set TORBOX_API_KEY.");
    torbox::Client client(key);
    auto response = client.api<torbox::api::UserApi>().getUserData({}, {}, {});
    if (!response->isSuccess()) throw std::runtime_error(response->getDetail());
    std::cout << boost::json::serialize(response->toJsonValue()) << '\n';
}
```

### C#

- Package: `TorBox.Sdk`, version 9.3.2026112508
- Registry: https://www.nuget.org/packages/TorBox.Sdk
- Source code and README: https://github.com/TorBox-App/torbox-sdk-csharp

```sh
dotnet add package TorBox.Sdk --version 9.3.2026112508
```

First request with the C# SDK:

```csharp
using System;
using TorBox.Sdk;
using TorBox.Sdk.Api;

using var client = new TorBoxClient(Environment.GetEnvironmentVariable("TORBOX_API_KEY")
    ?? throw new InvalidOperationException("Set TORBOX_API_KEY."));
var response = (await client.Api<IUserApi>().GetUserDataAsync()).Ok();
if (response is not { Success: true })
    throw new InvalidOperationException(response?.Detail ?? "TorBox request failed.");
Console.WriteLine(response.Data);
```

## Quick start [#quick-start]

Set `TORBOX_API_KEY` to your key from [TorBox settings](https://torbox.app/settings). Choose your SDK in
[Get User Data](/operations/get_user_data)'s request example to see how to initialize the client and make a request.

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.user.get_user_data()
print(result)
```

[View endpoint](/operations/get_user_data)

Each SDK's README covers authentication, pagination, and error handling. The PHP SDK requires PHP 8.1 or later.
Kotlin targets the JVM on Java 17 or later. C++ requires C++17, Boost.JSON, and OpenSSL. C# targets .NET 10.

# Torrents (/docs/torrents)

Torrents are TorBox's main use. You add a torrent with a magnet link or a torrent file, then control it by its
ID: reannounce, pause, resume or delete. Every request needs your [API key](/docs/authentication) in the
`Authorization: Bearer` header, except the download link endpoints, which take it as `token`.

## Add a torrent [#add-a-torrent]

[`POST /v1/api/torrents/createtorrent`](/operations/create_torrent) takes `multipart/form-data` with **either**
`magnet` or `file`. Choose **Magnet link** or **Torrent file** in the example.

**Magnet link**

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.create_torrent(magnet="magnet:?xt=urn:btih:YOUR_TORRENT_HASH")
print(result)
```

**Torrent file**

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.create_torrent(file="./ubuntu.torrent")
print(result)
```

[View endpoint](/operations/create_torrent)

| Field | Meaning |
| --- | --- |
| `magnet` / `file` | The magnet link or the torrent file. Send one of them. |
| `seed` | Seeding preference: `1` auto, `2` seed, `3` don't seed. Default is `1` or your setting. |
| `allow_zip` | Whether the torrent may be zipped. TorBox only zips torrents with 100 files or more. |
| `name` | The name you want the torrent to have. |
| `as_queued` | Queue the torrent instead of starting it (ignored on the free plan). |
| `add_only_if_cached` | Only add it if it is cached on TorBox; otherwise it is not added (`404 DOWNLOAD_NOT_CACHED`). |

Once checked, it starts downloading if your account has a free active download slot and it isn't too large
(`DOWNLOAD_TOO_LARGE`, `ACTIVE_LIMIT`). Mind the [two limits of this endpoint](/docs/rate-limits#how-createtorrent-counts).
[`asynccreatetorrent`](/operations/async_create_torrent) is the asynchronous variant.

## Check if something is cached [#check-if-something-is-cached]

[`GET /v1/api/torrents/checkcached`](/operations/get_torrent_cached_availability) takes comma-separated hashes in
`hash` (around 100 per request; repeat `hash` for more) and a `format` of `object` or `list`.

## List and track [#list-and-track]

[`GET /v1/api/torrents/mylist`](/operations/get_torrent_list) returns your torrents. Pass `id` to get one torrent
as an object instead of a list.

| Parameter | Meaning |
| --- | --- |
| `offset` | Offset of the items to get. Default `0`. |
| `limit` | Number of items per request. Default `1000`. |
| `bypass_cache` | Always get fresh information instead of the cached list. |

The list is only updated every 600 seconds unless you bypass the cache, so use `bypass_cache` sparingly.
Paginate with `offset` + `limit` until a page has fewer than `limit` items.

Download states include `downloading`, `uploading`, `stalled (no seeds)`, `paused`, `completed`, `cached`,
`metaDL` and `checkingResumeData`; the others are qBittorrent states.

## Control [#control]

[`POST /v1/api/torrents/controltorrent`](/operations/control_torrent) takes a JSON body with `torrent_id` (or
`all: true`) and an `operation` such as `reannounce`, `delete` or `resume`.

```python
import os
from torbox import TorBox
from torbox.models.control_torrent import ControlTorrent

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.torrents.control_torrent(ControlTorrent(torrent_id=123, operation="delete"))
print(result)
```

[View endpoint](/operations/control_torrent)

## Download links [#download-links]

[`GET /v1/api/torrents/requestdl`](/operations/request_torrent_download_link) returns a CDN link for a file
(`file_id`) or a zip of the torrent (`zip_link=true`). It takes your key as the `token` **query parameter**.

The endpoint description says it "opens the link for 3 hours for downloads" and that the time limit only
applies to starting downloads: once started, a download can take as long as it needs.

**Permalinks.** Instead of saving CDN links (they are not permanent), build a link that redirects:

```text
https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true
```

Opening it redirects to a fresh CDN link. This saves requests. To invalidate permalinks, reset your API key
or delete the item. Use `user_ip` to pick the CDN closest to your user when requesting on their behalf.

For many files at once use the batch variants
([GET](/operations/request_torrent_download_links_get), [POST](/operations/request_torrent_download_links_post)).

## Queued torrents [#queued-torrents]

Send `as_queued=true` when creating and the torrent is queued instead of started. Manage queued downloads with
the [Queued endpoints](/operations/get_queued_downloads).

# Usenet (/docs/usenet)

Usenet downloads work like [torrents](/docs/torrents): same envelope, same list, control and download link
patterns, with some differently named inputs and outputs (`usenet_id` instead of `torrent_id`).

## Add a usenet download [#add-a-usenet-download]

[`POST /v1/api/usenet/createusenetdownload`](/operations/create_usenet_download) takes `multipart/form-data` with
**either** an NZB `file` or a `link` to one (the link cannot be a redirect).

**NZB file**

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.usenet.create_usenet_download(file="./download.nzb")
print(result)
```

[View endpoint](/operations/create_usenet_download)

| Field | Meaning |
| --- | --- |
| `file` / `link` | An NZB file, or an accessible link to one. |
| `name` | The name you want the download to have. |
| `password` | Password used to extract the RAR at the end. |
| `post_processing` | `-1` (default: repair, extract, delete source files), `0` (none) and more; see the endpoint. |
| `as_queued` | Queue it instead of starting it. |
| `add_only_if_cached` | Only add it if it is cached on TorBox. |

Rate limit: **60/hour** per API token, for this endpoint and
[`asynccreateusenetdownload`](/operations/async_create_usenet_download).

## List, control, download [#list-control-download]

| | |
| --- | --- |
| List | [`GET /v1/api/usenet/mylist`](/operations/get_usenet_list) (`id`, `offset`, `limit`, `bypass_cache`) |
| Control | [`POST /v1/api/usenet/controlusenetdownload`](/operations/control_usenet_download) |
| Cached? | [`GET /v1/api/usenet/checkcached`](/operations/get_usenet_cached_availability) |
| Download link | [`GET /v1/api/usenet/requestdl`](/operations/request_usenet_download_link) (`token`, `usenet_id`, `file_id`, `zip_link`, `redirect`) |

## News server access [#news-server-access]

Read the news server connection details with
[`GET /v1/api/usenet/provider/connection`](/operations/get_news_server_connection_information) (rate limited to
**5/sec**).

# Web downloads (/docs/web-downloads)

Web downloads (debrid) fetch a file from a link (images, YouTube videos and more) into your TorBox. The API is
practically the same as the [Torrents](/docs/torrents) and [Usenet](/docs/usenet) ones, with `web_id` as the ID.

## Add a web download [#add-a-web-download]

[`POST /v1/api/webdl/createwebdownload`](/operations/create_web_download) takes
`application/x-www-form-urlencoded` with a required `link` (cannot be a redirect).

```python
import os
from torbox import TorBox

client = TorBox(api_key=os.environ["TORBOX_API_KEY"])
result = client.web_downloads.create_web_download(link="https://example.com/file.zip")
print(result)
```

[View endpoint](/operations/create_web_download)

| Field | Meaning |
| --- | --- |
| `link` | An accessible link to the file. Required. |
| `password` | Password to the file, if it needs one. |
| `name` | The name you want the download to have. |
| `as_queued` | Queue it instead of starting it. |
| `add_only_if_cached` | Only add it if it is cached on TorBox. |

Rate limit: **60/hour** per API token, for this endpoint and
[`asynccreatewebdownload`](/operations/async_create_web_download). A link from a site TorBox cannot download from
gets `400 UNSUPPORTED_SITE`; the supported sites are listed by
[`GET /v1/api/webdl/hosters`](/operations/get_hoster_list).

## List, control, download [#list-control-download]

| | |
| --- | --- |
| List | [`GET /v1/api/webdl/mylist`](/operations/get_web_download_list) (`id`, `offset`, `limit`, `bypass_cache`) |
| Control | [`POST /v1/api/webdl/controlwebdownload`](/operations/control_web_download) |
| Cached? | [`GET /v1/api/webdl/checkcached`](/operations/get_web_download_cached_availability) |
| Download link | [`GET /v1/api/webdl/requestdl`](/operations/request_web_download_link) (`token`, `web_id`, `file_id`, `zip_link`, `redirect`) |

---

# API operations

Generated from https://api.torbox.app/openapi.json.

## Refresh API Token

`POST https://api.torbox.app/v1/api/user/refreshtoken`

- Operation ID: `refresh_api_token`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

If you want a new API token, or your old one has been compromised, you may request a new one. If you happen to forget the token, go the [TorBox settings page ](https://torbox.app/settings) and copy the current one. If this still doesn't work, you may contact us at our support email for a new one.

### Authorization

Requires an API key using the Authorization Bearer Header as well as passing the `session_token` from the website to be passed in the body. You can find the `session_token` in the localStorage of your browser on any TorBox.app page under the key `torbox_session_token`. This is a temporary token that only lasts for 1 hour, which is why it is used here to verify the identity of a user as well as their API token.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `session_token` | string | yes | you can get this by logging into https://torbox.app and finding the torbox_session_token in local storage |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Confirmation Code

`GET https://api.torbox.app/v1/api/user/getconfirmation`

- Operation ID: `get_confirmation_code`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Requests a 6 digit code to be sent to the user's email for verification. Used to verify a user actually wants to perform a potentially dangerous action.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get User Data

`GET https://api.torbox.app/v1/api/user/me`

- Operation ID: `get_user_data`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets a users account data and information.

### Plans

`0` is Free plan

`1` is Essential plan (_$3 plan_)

`2` is Pro plan (_$10 plan_)

`3` is Standard plan (_$5 plan_)

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `settings` | query | boolean | no | Allows you to retrieve user settings. |
| `download_stats` | query | boolean | no |  |
| `referral` | query | boolean | no |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Add Referral To Account

`POST https://api.torbox.app/v1/api/user/addreferral`

- Operation ID: `add_referral_to_account`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Automatically adds a referral code to the user's account. This can be used for developers to automatically add their referral to user's accounts who use their service.

This will not override any referral a user already has. If they already have one, then it cannot be changed using this endpoint. It can only be done by the user on the [website](https://torbox.app/subscription).

### Authorization

Requires an API key using the Authorization Bearer Header. Use the user's API key, not your own.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `referral` | query | string | yes | A referral code. Must be UUID. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Start Device Code Authorization Process

`GET https://api.torbox.app/v1/api/user/auth/device/start`

- Operation ID: `start_device_code_authorization_process`
- Group: User
- Auth: none

### Overview

Starts the device code authorization process. Returns all the necessary information to complete the rest of the flow. This includes the following:

- `device_code` - The code your app will use for consecutive requests for getting the user token.

- `code` - This is the 6 digit code that you show to the user to be entered at the following verification_url.

- `verification_url` - This url which you will show as a QR code.

- `friendly_verification_url` - The friendly short url which you can show as plain text to user if they cannot use the QR code method.


You may also submit the `app` parameter to this request to show your app name on the `verification_url` page. This concretes user trust in authorizing your application to use their TorBox account. This is not required, but is a good idea. Default is "Third Party App". This name is also only allowed to be alpha-numeric characters (_A-Z,0-9_). Anything else will be filtered our when being shown to the user. The `friendly_verification_url` will always show "Third Party App" to keep the URL short.

The device_code is only valid for 10 minutes. Make sure the user is aware of this time limit so they submit and login before this time limit is over.

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `app` | query | string | no | The app name that the user will see when verifying the code. This should be the name of your app. |

## Responses

- `200` Successful Response
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get Token From Device Code Process

`POST https://api.torbox.app/v1/api/user/auth/device/token`

- Operation ID: `get_token_from_device_code_process`
- Group: User
- Auth: none

### Overview

Gets the user's API token from the device code authorization process. This endpoint is expected to be polled in interval until it returns success, or until the expiry has passed. All data you need for this request is in the [original request](https://api.torbox.app/docs#/User/start_device_code_authorization_process), which includes the interval to be polled by, the expiry time to stop at, and `device_code` to be sent to the API to get the correct data.

### Authorization

None required.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `device_code` | string | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Delete Account

`DELETE https://api.torbox.app/v1/api/user/deleteme`

- Operation ID: `delete_account`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Permanently deletes the user's TorBox account. This cannot be undone.

Because of how dangerous this action is, it needs two things on top of the API key: the user's session token from the website, and a confirmation code, which is sent to the user's email by the Get Confirmation Code endpoint.

### Authorization

Requires an API key using the Authorization Bearer Header, as well as the session token and the confirmation code in the body.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `session_token` | string | yes | The user's session token from the website. It must belong to the same account as the API key. |
| `confirmation_code` | integer | yes | The confirmation code that was sent to the user's email by the Get Confirmation Code endpoint. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `410` Gone
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Referral Data

`GET https://api.torbox.app/v1/api/user/referraldata`

- Operation ID: `get_referral_data`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Use this endpoint to get the user's referral data. This includes information such as how many referrals they have made, and their referral code.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Subscriptions

`GET https://api.torbox.app/v1/api/user/subscriptions`

- Operation ID: `get_subscriptions`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets a users subscriptions. This includes active and inactive subscriptions for all payment processors.

It should be noted that "plan_code" is not normalized to the standard plan codes such as 1, 2, or 3. These "plan_code"s are payment processor specific and used internally. If you want to display these subscriptions, use the "plan_name".

For displaying information to users, use the "status", "gateway", and "plan_name". No other information is relevant to the user, and the rest is used for TorBox internally.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Transactions

`GET https://api.torbox.app/v1/api/user/transactions`

- Operation ID: `get_transactions`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Use this endpoint to get the user's list of transactions. This data isn't exactly relevant to a third party developer, unless you want to build full parity with TorBox's dashboard, or simply want to show this information.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Transaction PDF

`GET https://api.torbox.app/v1/api/user/transaction/pdf`

- Operation ID: `get_transaction_pdf`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Generates a PDF of the transaction information. Requires the transaction ID from the "Get Transactions" request.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `transaction_id` | query | string | yes | The transaction ID that you want to generate the PDF for. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Edit User Settings

`PUT https://api.torbox.app/v1/api/user/settings/editsettings`

- Operation ID: `edit_user_settings`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Edits a user's TorBox settings. These values take effect immediately. Please view the body to read about allowed options and parameters.

To get the user settings, simply use the "[Get User Data](https://api.torbox.app/docs#/User/get_user_data)" endpoint, while sending the "?settings=true" parameter

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email_notifications` | boolean | no | When the user recieves a notification, send to registered email |
| `web_notifications` | boolean | no | When the user recieves a notification, send to web (if browser is open, otherwise it will be in their notifications panel) |
| `mobile_notifications` | boolean | no | When the user recieves a notification, send to TorBox mobile app (deprecated) |
| `rss_notifications` | boolean | no | When the user recieves a notification, add to user's RSS feed |
| `download_speed_in_tab` | boolean | no | Shows download speed in tab name in browser when using the TorBox dashboard. Third party apps may still use this setting. |
| `show_tracker_in_torrent` | boolean | no | Shows active tracker in torrents on the TorBox dashboard. Third party apps may still use this setting. |
| `stremio_quality` | integer[] | no | Determines what qualities are shown to the user when using the TorBox Stremio addon. It is always recommended to include 0 (Unknown). Third party apps may still use this setting. - `0`: Unknown Quality - `1`: Cam Quality - `2`: DVD-R Quality - `3`: HDTV Quality - `4`: HDRip Quality - `5`: WEB-DL Quality - `6`: WEBRip Quality - `7`: Blu-Ray/BD/BDRip Quality - `8`: HDR Quality - `9`: HDR10 Quality - `10`: HDR10+ Quality - `11`: Dolby Vision Quality |
| `stremio_resolution` | integer[] | no | Determines what resolutions are shown to the user. It is always recommended to include 0 (Unknown). Third party apps may still use this setting. - `0`: Unknown Resolution - `1`: SD Resolution - `2`: HD Resolution - `3`: UHD Resolution |
| `stremio_language` | integer[] | no | Determines what languages are shown to the user. It is always recommended to include 0 (Unknown). Third party apps may still use this setting. - `0`: Unknown - `1`: English - `2`: Spanish - `3`: French - `4`: German - `5`: Italian - `6`: Portuguese - `7`: Russian - `8`: Japanese - `9`: Korean - `10`: Chinese - `11`: Arabic - `12`: Hindi - `13`: Bengali - `14`: Ukrainian - `15`: Nordic - `16`: Czech - `17`: Polish - `18`: Tamil - `19`: Telugu - `20`: Kannada - `21`: Dutch |
| `stremio_cache` | integer[] | no | Determines what cached status items to show to users. While this is an array, only a single value is accepted at a time to prevent issues. Still submit this as an array to the API. Third party apps may still use this setting. - `1`: Cached and Download - `2`: Cached Only - `3`: Download Only |
| `stremio_size_lower` | integer | no | The minimum size of files that will be shown to the user in the TorBox Stremio addon. Third party apps may still use this setting. |
| `google_drive_folder_id` | string | no |  |
| `onedrive_save_path` | string | no |  |
| `discord_id` | string | no |  |
| `discord_notifications` | boolean | no | When the user recieves a notification, use the official TorBox Discord Bot to DM the user the notification. Must have a Discord_ID present and must share a server with the Discord Bot. |
| `stremio_allow_adult` | boolean | no | Determines whether to show adult content on the TorBox Stremio addon. Third party apps may still use this setting. |
| `stremio_seed_torrents` | integer | no | 1 = Auto, 2 = Always, 3 = Never |
| `seed_torrents` | integer | no | 1 = Auto, 2 = Always, 3 = Never |
| `allow_zipped` | boolean | no |  |
| `stremio_allow_zipped` | boolean | no |  |
| `onefichier_folder_id` | string | no |  |
| `gofile_folder_id` | string | no |  |
| `webhook_notifications` | boolean | no |  |
| `webhook_url` | string | no |  |
| `telegram_notifications` | boolean | no |  |
| `telegram_id` | string | no |  |
| `mega_email` | string | no |  |
| `mega_password` | string | no |  |
| `stremio_sort` | string | no | seeders = Seeders/Age (highest seeders first/lowest age first), size = Size (highest size first), resolution = Resolution (highest resolution first) |
| `cdn_selection` | string | no | any available CDN. Can be found using test file route |
| `stremio_use_custom_search_engines` | boolean | no |  |
| `stremio_result_sort` | string | no | torrents = Torrents first, usenet = Usenet first |
| `webdav_use_local_files` | boolean | no |  |
| `stremio_legacy_your_media` | boolean | no |  |
| `stremio_only_your_media_streams` | boolean | no | only shows Your Media streams in Stremio addon |
| `stremio_disable_your_media_streams` | boolean | no |  |
| `webdav_use_folder_view` | boolean | no |  |
| `webdav_flatten` | boolean | no |  |
| `stremio_limit_per_resolution_torrent` | integer | no |  |
| `stremio_limit_per_resolution_usenet` | integer | no |  |
| `stremio_size_upper` | integer | no |  |
| `stremio_torrent_seeders_cutoff` | integer | no |  |
| `pixeldrain_api_key` | string | no |  |
| `onefichier_api_key` | string | no |  |
| `gofile_api_key` | string | no |  |
| `patreon_id` | string | no |  |
| `stremio_wait_for_download_usenet` | boolean | no |  |
| `stremio_wait_for_download_torrent` | boolean | no |  |
| `stremio_disable_filtered_note` | boolean | no |  |
| `stremio_emoji_in_description` | boolean | no |  |
| `dashboard_filter` | object | no | sorts the user's dashboard. Does not affect third party dashboards. This entire dict MUST be presented with all keys for any update to be given. |
| `web_player_always_transcode` | boolean | no |  |
| `web_player_always_skip_intro` | boolean | no |  |
| `web_player_audio_preferred_language` | string | no |  |
| `web_player_subtitle_preferred_language` | string | no |  |
| `web_player_disable_prestream_selector` | boolean | no |  |
| `dashboard_sort` | string | no | default = TorBox default sorting, name = AZ sorting, size = largest size first, added_date = newest first, cached_date = newest first, last_updated = newest first, progress = highest progress first, ratio = highest ratio first, download_speed = highest value first, upload_speed = highest value first, eta = smallest eta first |
| `web_player_disable_next_up_dialogue` | boolean | no |  |
| `web_player_enable_scrobbling` | boolean | no |  |
| `append_filename_to_links` | boolean | no |  |
| `subscribed_email_segments` | string[] | no |  |
| `disable_ai` | boolean | no |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get User Stats

`GET https://api.torbox.app/v1/api/user/stats`

- Operation ID: `get_user_stats`
- Group: User
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets a users stats. This data is currently split into two sections, "general" and "bandwidth". General shows general data, such as "Total Data Downloaded", "Total Data Egress", "Overall Ratio", and "Total Downloaded". Bandwidth shows the amount of bandwidth a user has downloaded within the past 30 days. We don't store this data for longer than 30 days, and it can be made more or less granular. Makes cool graphs!

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `general` | query | boolean | no | Retrieve general stats. |
| `bandwidth` | query | boolean | no | Retrieve bandwidth stats. |
| `bandwidth_grouping` | query | string | no | If the "bandwidth" query parameter is sent, this value is used. Allowed is "hour", "day", "week", and "month", this narrates how bandwidth is grouped. More granular shows more information. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Create Torrent

`POST https://api.torbox.app/v1/api/torrents/createtorrent`

- Operation ID: `create_torrent`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a torrent under your account. Simply send **either** a magnet link, or a torrent file. Once they have been checked, they will begin downloading assuming your account has available active download slots, and they aren't too large.

### Rate Limits

This endpoint has two limits that apply at the same time:

- **300 requests per minute:** a shared ceiling that _every_ request counts against, whether the torrent is cached or uncached.

- **60 uncached torrents per hour:** an additional, stricter limit that only uncached torrents count against. A request sent with `add_only_if_cached` is not counted, because it adds nothing when the torrent is not cached. It is counted when it is also sent with `as_queued`, because a queued torrent is added whether it is cached or not.


The important thing is that cached and uncached requests both draw from the same 300/min pool, but uncached requests _also_ draw from their own separate 60/hour pool. An uncached request therefore counts twice: once against the per-minute limit, and once against the per-hour uncached limit.

**Example:** In a single minute you add 250 cached + 50 uncached torrents. That's 300 total, so you've hit the per-minute limit for that minute. But those 50 uncached torrents also came out of your 60/hour uncached budget, leaving only **10 uncached torrents** for the remaining 59 minutes of that hour. (You could still add plenty more _cached_ torrents during that hour, since cached requests aren't capped hourly: only by the 300/min ceiling.)

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`multipart/form-data`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string | no | The torrent's torrent file. Optional. |
| `magnet` | string | no | The torrent's magnet link. Optional. |
| `seed` | integer | no | Tells TorBox your preference for seeding this torrent. 1 is auto. 2 is seed. 3 is don't seed. Optional. Default is 1, or whatever the user has in their settings. Overwrites option in settings. |
| `allow_zip` | boolean | no | Tells TorBox if you want to allow this torrent to be zipped or not. TorBox only zips if the torrent is 100 files or larger. |
| `name` | string | no | The name you want the torrent to be. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this torrent instantly queued. This is bypassed if user is on free plan, and will process the request as normal in this case. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Async Create Torrent

`POST https://api.torbox.app/v1/api/torrents/asynccreatetorrent`

- Operation ID: `async_create_torrent`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a torrent asynchrously under your account. Simply send **either** a magnet link, or a torrent file. Once they have been checked, they will begin downloading assuming your account has available active download slots, and they aren't too large.

The request will return instantly, not returning any data other than a success message. This is the same for failures, as they will return the error in the background, rather than immediately.

### Rate Limits

This endpoint has the same limits as the Create Torrent endpoint: **300 requests per minute**, and **60 uncached torrents per hour**. The hourly limit is shared between the two endpoints, so an uncached torrent added through either one counts against the same 60. As on that endpoint, a request sent with `add_only_if_cached` and without `as_queued` is not counted against the hourly limit.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`multipart/form-data`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string | no | The torrent's torrent file. Optional. |
| `magnet` | string | no | The torrent's magnet link. Optional. |
| `seed` | integer | no | Tells TorBox your preference for seeding this torrent. 1 is auto. 2 is seed. 3 is don't seed. Optional. Default is 1, or whatever the user has in their settings. Overwrites option in settings. |
| `allow_zip` | boolean | no | Tells TorBox if you want to allow this torrent to be zipped or not. TorBox only zips if the torrent is 100 files or larger. |
| `name` | string | no | The name you want the torrent to be. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this torrent instantly queued. This is bypassed if user is on free plan, and will process the request as normal in this case. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control Torrent

`POST https://api.torbox.app/v1/api/torrents/controltorrent`

- Operation ID: `control_torrent`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls a torrent. By sending the torrent's ID and the type of operation you want to perform, it will send that request to the torrent client.

Operations are either:

- **Reannounce** `reannounces the torrent to get new peers`

- **Delete** `deletes the torrent from the client and your account permanently`

- **Resume** `resumes a paused torrent`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | the operation you want to perform on the torrent |
| `torrent_id` | integer | no | the torrent's id, optional if using "all" parameter |
| `all` | boolean | no | if you want to do this operation to all torrents in your account, optional if using the "torrent_id" parameter |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Queued Torrents

`GET https://api.torbox.app/v1/api/torrents/getqueued`

- Operation ID: `get_queued_torrents`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)
- **Deprecated**

### Overview

This endpoint is deprecated and always answers with a `DEPRECATED` error. Use the Get Queued Downloads endpoint (`/v1/api/queued/getqueued`) instead.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `404` Not Found
- `410` Gone
- `429` Too Many Requests


---

## Control Queued Torrents

`POST https://api.torbox.app/v1/api/torrents/controlqueued`

- Operation ID: `control_queued_torrents`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)
- **Deprecated**

### Overview

This endpoint is deprecated and always answers with a `DEPRECATED` error. Use the Control Queued Downloads endpoint (`/v1/api/queued/controlqueued`) instead.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `404` Not Found
- `410` Gone
- `429` Too Many Requests


---

## Request Download Link

`GET https://api.torbox.app/v1/api/torrents/requestdl`

- Operation ID: `request_torrent_download_link`
- Group: Torrents
- Auth: API key as the `token` query parameter

### Overview

Requests the download link from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Permalinks

Instead of generating many CDN urls by requesting this endpoint, you can instead create a permalink such as: `https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true` and when a user clicks on it, it will automatically redirect them to the CDN link. This saves requests and doesn't abuse the API. Use this method rather than saving CDN links as they are not permanent. To invalidate these permalinks, simply reset your API token or delete the item from your dashboard.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `torrent_id` | query | integer | yes | The torrent's ID that you want to download |
| `file_id` | query | integer | no | The files's ID that you want to download |
| `zip_link` | query | boolean | no | If you want a zip link. Required if no file_id. Takes precedence over file_id if both are given. |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `redirect` | query | boolean | no | If you want to redirect the user to the CDN link. This is useful for creating permalinks so that you can just make this request URL the link. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Responses

- `200` Successful Response
- `307` Temporary Redirect
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Links - GET

`GET https://api.torbox.app/v1/api/torrents/requestdl/batch`

- Operation ID: `request_torrent_download_links_get`
- Group: Torrents
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `torrent_id` | query | integer | yes | The torrent's ID that you want to download |
| `file_ids` | query | integer[] | no | The files's ID that you want to download |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Links - POST

`POST https://api.torbox.app/v1/api/torrents/requestdl/batch`

- Operation ID: `request_torrent_download_links_post`
- Group: Torrents
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `torrent_id` | query | integer | yes | The torrent's ID that you want to download |
| `file_ids` | query | integer[] | no |  |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Torrent List

`GET https://api.torbox.app/v1/api/torrents/mylist`

- Operation ID: `get_torrent_list`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the user's torrent list. This gives you the needed information to perform other torrent actions. This information only gets updated every 600 seconds, or when the _Request Update On Torrent_ request is sent to the _relay API_.

#### Download States:

- "downloading" -> The torrent is currently downloading.

- "uploading" -> The torrent is currently seeding.

- "stalled (no seeds)" -> The torrent is trying to download, but there are no seeds connected to download from.

- "paused" -> The torrent is paused.

- "completed" -> The torrent is completely downloaded. Do not use this for download completion status.

- "cached" -> The torrent is cached from the server.

- "metaDL" -> The torrent is downloading metadata from the hoard.

- "checkingResumeData" -> The torrent is checking resumable data.


All other statuses are basic qBittorrent states. [Check out here for the full list](https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#torrent-management).

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | no | Determines the torrent requested, will return an object rather than list. Optional. |
| `bypass_cache` | query | boolean | no | Allows you to bypass the cached data, and always get fresh information. Useful if constantly querying for fresh download stats. Otherwise, we request that you save our database a few calls. |
| `offset` | query | integer | no | Determines the offset of items to get from the database. Default is 0. Optional. |
| `limit` | query | integer | no | Determines the number of items to recieve per request. Default is 1000. Optional. |
| `files` | query | boolean | no | Exclude files from response. Optional |
| `active` | query | boolean | no | Shows only active downloads. Optional |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Torrent Cached Availability

`GET https://api.torbox.app/v1/api/torrents/checkcached`

- Operation ID: `get_torrent_cached_availability`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated torrent hashes and checks if the torrent is cached. This endpoint only gets a max of around 100 at a time, due to http limits in queries. If you want to do more, you can simply do more hash queries. Such as:
`?hash=XXXX&hash=XXXX&hash=XXXX`

or `?hash=XXXX,XXXX&hash=XXXX&hash=XXXX,XXXX`
and this will work too. Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no | The list of torrent hashes you want to check. Comma seperated. |
| `format` | query | string | no | Format you want the data in. Acceptable is either "object" or "list". List is the most performant option as it doesn't require modification of the list. |
| `list_files` | query | boolean | no | Allows you to list the files found inside the cached data. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Torrent Cached Availability Batch

`POST https://api.torbox.app/v1/api/torrents/checkcached`

- Operation ID: `get_torrent_cached_availability_batch`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated torrent hashes and checks if the torrent is cached. With the POST endpoint you can submit a nearly unlimited hashes compared to the GET endpoint which is limited by url parameters.


Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no |  |
| `format` | query | string | no |  |
| `list_files` | query | boolean | no |  |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Export Torrent Data

`GET https://api.torbox.app/v1/api/torrents/exportdata`

- Operation ID: `export_torrent_data`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Exports the magnet or torrent file. Requires a type to be passed. If type is **magnet**, it will return a JSON response with the magnet as a string in the _data_ key. If type is **file**, it will return a bittorrent file as a download. Not compatible with cached downloads.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `torrent_id` | query | integer | yes | The torrent's ID. |
| `type` | query | string | yes | Either "magnet" or "file". Tells how the API what to get, and what to respond as. If magnet, it returns a JSON response with the magnet as a string in the data key. If file, it responds with a torrent file download. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Magnet To File

`POST https://api.torbox.app/v1/api/torrents/magnettofile`

- Operation ID: `magnet_to_file`
- Group: Torrents
- Auth: none

### Overview

Converts any magnet to a torrent file. Does not require the magnet to be on your TorBox account or in the TorBox cache. Free endpoint for public use.

### Authorization

None required.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `magnet` | string | yes |  |

## Responses

- `200` Successful Response
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get Torrent Info

`GET https://api.torbox.app/v1/api/torrents/torrentinfo`

- Operation ID: `get_torrent_info`
- Group: Torrents
- Auth: none

### Overview

A general route that allows you to give a hash, and TorBox will return data about the torrent. This data is retrieved from the Bittorrent network, so expect it to take some time. If the request goes longer than 10 seconds, TorBox will cancel it. You can adjust this if you like, but the default is 10 seconds. This route is cached as well, so subsequent requests will be instant.

**It is not recommended to use this for checking TorBox's cache. Please use the GET /checkcache endpoint instead.**

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string | yes | Hash of the torrent you want to get info for. This is required. |
| `timeout` | query | integer | no | The amount of time you want TorBox to search for the torrent on the Bittorrent network. If the number of seeders is low or even zero, this value may be helpful to move up. Default is 10. Optional. |
| `use_cache_lookup` | query | boolean | no | If you want to use a pre-cached request if sent before. This can save a lot of time. Default false. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get Torrent Info

`POST https://api.torbox.app/v1/api/torrents/torrentinfo`

- Operation ID: `get_torrent_info_from_file`
- Group: Torrents
- Auth: none

### Overview

Same as the GET route, but allows posting data such as magnet, and torrent files.

Hashes will have precedence over magnets, and magnets will have precedence over torrent files.

Only proper torrent files are accepted.

At least one of hash, magnet, or torrent file is required.

A general route that allows you to give a hash, and TorBox will return data about the torrent. This data is retrieved from the Bittorrent network, so expect it to take some time. If the request goes longer than 10 seconds, TorBox will cancel it. You can adjust this if you like, but the default is 10 seconds. This route is cached as well, so subsequent requests will be instant.

**It is not recommended to use this for checking TorBox's cache. Please use the GET /checkcache endpoint instead.**

### Authorization

None required.

## Request body (`multipart/form-data`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timeout` | integer | no | The amount of time you want TorBox to search for the torrent on the Bittorrent network. If the number of seeders is low or even zero, this value may be helpful to move up. Default is 10. Optional. |
| `hash` | string | no | A torrent hash for requesting information about the torrent. Optional. |
| `magnet` | string | no | A magnet link for requesting information abouit the torrent. Optional. |
| `file` | string | no | A torrent file for requesting information about the torrent. Optional. |
| `use_cache_lookup` | boolean | no | If you want to use a pre-cached request if sent before. This can save a lot of time. Default false. |
| `peers_only` | boolean | no | Uses a quick lookup method using the trackers contained within the magnet or file. Requires the submitted magnet or torrent file to contain trackers of UDP or HTTP(S) to work. This will not get metadata such as name, size, or files. Best used for simply and quickly gathering the current seeds and peers according to the trackers. Uses the highest number of all the trackers as the final value. Default off. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Edit Torrent Item

`PUT https://api.torbox.app/v1/api/torrents/edittorrent`

- Operation ID: `edit_torrent_item`
- Group: Torrents
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Updates a download item based on the item's ID.
Sending a PUT request with valid items overwrites the previous items entirely, so use this endpoint with caution. Please make sure to read the restrictions below as they are important.

### Restrictions

- Does not affect the cached database (or any other user's item).

- Name must pass validation:

    - Above 1 character long.

    - Below 200 characters long.

    - Cannot contain any non-url or non filesystem safe characters. (This is removed automatically).

    - Cannot contain any leading or trailing whitespace. You can have spaces in the middle. (This is removed automatically).

- Tags follow the same rules as the name.

- Alternative hashes must be of MD5, SHA1, or SHA256.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `torrent_id` | integer | yes |  |
| `name` | string | no |  |
| `tags` | string[] | no |  |
| `alternative_hashes` | string[] | no |  |
| `airlocked` | boolean | no |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Up Status

`GET https://api.torbox.app/`

- Operation ID: `get_up_status`
- Group: General
- Auth: none

### Overview

Simply gets if the TorBox API is available for use or not. Also might include information about downtimes.

### Authorization

None needed.

## Responses

- `200` Successful Response
- `404` Not Found
- `429` Too Many Requests
- `502` Bad Gateway


---

## Get Stats

`GET https://api.torbox.app/v1/api/stats`

- Operation ID: `get_stats`
- Group: General
- Auth: none

### Overview

Simply gets general stats about the TorBox service.

### Authorization

None needed.

## Responses

- `200` Successful Response
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get 30 Day Stats

`GET https://api.torbox.app/v1/api/stats/30days`

- Operation ID: `get_30_day_stats`
- Group: General
- Auth: none

### Overview

Gets the general stats of the TorBox service for the last 30 days, one entry per day. Each entry is a snapshot of the totals at that time.

### Authorization

None needed.

## Responses

- `200` Successful Response
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get RSS Notification Feed

`GET https://api.torbox.app/v1/api/notifications/rss`

- Operation ID: `get_rss_notification_feed`
- Group: Notifications
- Auth: API key as the `token` query parameter

### Overview

Gets your notifications in an RSS Feed which allows you to use them with RSS Feed readers or notification services that can take RSS Feeds and listen to updates. As soon as a notification goes to your account, it will be added to your feed.

### Authorization

Requires an API key using as a query parameter using the `token` key.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | The user's API key. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Notification Feed

`GET https://api.torbox.app/v1/api/notifications/mynotifications`

- Operation ID: `get_notification_feed`
- Group: Notifications
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets your notifications in a JSON object that is easily parsable compared to the RSS Feed. Gives all the same data as the RSS Feed.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `bypass_cache` | query | boolean | no |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Clear All Notifications

`POST https://api.torbox.app/v1/api/notifications/clear`

- Operation ID: `clear_all_notifications`
- Group: Notifications
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Marks all of your notifications as read and deletes them permanently.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Clear Single Notification

`POST https://api.torbox.app/v1/api/notifications/clear/{id}`

- Operation ID: `clear_single_notification`
- Group: Notifications
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Marks a single notification as read and permanently deletes it from your notifications. Requires a `notification_id` which can be found by getting your notification feed.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Send Test Notification

`POST https://api.torbox.app/v1/api/notifications/test`

- Operation ID: `send_test_notification`
- Group: Notifications
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Sends a test notification to all enabled notification types. This can be useful for validating setups. No need for any body in this request.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Changelogs RSS Feed

`GET https://api.torbox.app/v1/api/changelogs/rss`

- Operation ID: `get_changelogs_rss_feed`
- Group: General
- Auth: none

### Overview

Gets most recent 100 changelogs from [https://feedback.torbox.app/changelog](https://feedback.torbox.app/changelog). This is useful for people who want updates on the TorBox changelog. Includes all the necessary items to make this compatible with RSS feed viewers for notifications, and proper HTML viewing.

### Authorization

None needed.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no |  |
| `limit` | query | integer | no |  |

## Responses

- `200` Successful Response
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Changelogs JSON

`GET https://api.torbox.app/v1/api/changelogs/json`

- Operation ID: `get_changelogs_json`
- Group: General
- Auth: none

### Overview

Gets most recent changelogs from [https://feedback.torbox.app/changelog](https://feedback.torbox.app/changelog). This is useful for developers who want to integrate the changelog into their apps for their users to see. Includes content in HTML for developers to easily render the text in a fancy yet simple way.

### Authorization

None needed.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `offset` | query | integer | no |  |
| `limit` | query | integer | no |  |

## Responses

- `200` Successful Response
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Speedtest Files

`GET https://api.torbox.app/v1/api/speedtest`

- Operation ID: `get_speedtest_files`
- Group: General
- Auth: none

### Overview

Gets CDN speedtest files. This can be used for speedtesting TorBox for users or other usages, such as checking download speeds for verification. Provides all necessary data such as region, server name, and even coordinates. Uses the requesting IP to determine if the server is the closest to the user.

You also have the ability to choose between long tests or short tests via the "test_length" parameter. You may also force the region selection by passing the "region" as a specific region.

### Authorization

None needed.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user_ip` | query | string | no | Pass a user's IP to get the closest server to them, otherwise will use the calling IP for location. |
| `region` | query | string | no | Determines what cdns are returned. May be any region that TorBox is located in. To get this value, send a request without this value to determine all of the available regions that are available. |
| `test_length` | query | string | no | Determines the size of the file used for the speedtest. May be "long" or "short". Optional. |

## Responses

- `200` Successful Response
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests


---

## Create Web Download

`POST https://api.torbox.app/v1/api/webdl/createwebdownload`

- Operation ID: `create_web_download`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a web download under your account. Simply send a link to any file on the internet. Once it has been checked, it will begin downloading assuming your account has available active download slots, and they aren't too large.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/x-www-form-urlencoded`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `link` | string | yes | An accessible link to any file on the internet. Cannot be a redirection. |
| `password` | string | no | Password to the file, if the files requires it. Optional. |
| `name` | string | no | The name you want the torrent to be. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this web download.instantly queued. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Async Create Web Download

`POST https://api.torbox.app/v1/api/webdl/asynccreatewebdownload`

- Operation ID: `async_create_web_download`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a web download asynchronously under your account. Simply send a link to any file on the internet. Once it has been checked, it will begin downloading assuming your account has available active download slots, and they aren't too large.

The request will return instantly, not returning any data other than a success message. This is the same for failures, as they will return the error in the background as a notification, rather than immediately.

### Rate Limits

This endpoint is rate limited to **60 requests per hour** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/x-www-form-urlencoded`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `link` | string | yes | An accessible link to any file on the internet. Cannot be a redirection. |
| `password` | string | no | Password to the file, if the files requires it. Optional. |
| `name` | string | no | The name you want the web download to be. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this web download instantly queued. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control Web Download

`POST https://api.torbox.app/v1/api/webdl/controlwebdownload`

- Operation ID: `control_web_download`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls a web download. By sending the web download's ID and the type of operation you want to perform, it will send that request to the debrid client.

Operations are either:

- **Delete** `deletes the download from the client and your account permanently`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | the operation you want to perform on the web download. Can be "delete". |
| `webdl_id` | integer | no | the web download's id, optional if using the "all" parameter. |
| `all` | boolean | no | if you want to do this operation to all web downloads in your account, optional if using the "webdl_id" parameter |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Link

`GET https://api.torbox.app/v1/api/webdl/requestdl`

- Operation ID: `request_web_download_link`
- Group: Web Downloads (Debrid)
- Auth: API key as the `token` query parameter

### Overview

Requests the download link from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Permalinks

Instead of generating many CDN urls by requesting this endpoint, you can instead create a permalink such as: `https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true` and when a user clicks on it, it will automatically redirect them to the CDN link. This saves requests and doesn't abuse the API. Use this method rather than saving CDN links as they are not permanent. To invalidate these permalinks, simply reset your API token or delete the item from your dashboard.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `web_id` | query | integer | yes | The web download's ID that you want to download |
| `file_id` | query | integer | no | The files's ID that you want to download |
| `zip_link` | query | boolean | no | If you want a zip link. Required if no file_id. Takes precedence over file_id if both are given. |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `redirect` | query | boolean | no | If you want to redirect the user to the CDN link. This is useful for creating permalinks so that you can just make this request URL the link. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Links - GET

`GET https://api.torbox.app/v1/api/webdl/requestdl/batch`

- Operation ID: `request_web_download_links_get`
- Group: Web Downloads (Debrid)
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `web_id` | query | integer | yes | The web download's ID that you want to download |
| `file_ids` | query | integer[] | no | The files's ID that you want to download |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Request Download Links - POST

`POST https://api.torbox.app/v1/api/webdl/requestdl/batch`

- Operation ID: `request_web_download_links_post`
- Group: Web Downloads (Debrid)
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `web_id` | query | integer | yes | The web downloads' ID that you want to download |
| `file_ids` | query | integer[] | no |  |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get Web Download List

`GET https://api.torbox.app/v1/api/webdl/mylist`

- Operation ID: `get_web_download_list`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the user's web download list. This gives you the needed information to perform other usenet actions. Unlike Torrents, this information is updated on its own every 5 seconds for live web downloads.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | no | Determines the torrent requested, will return an object rather than list. Optional. |
| `bypass_cache` | query | boolean | no | Allows you to bypass the cached data, and always get fresh information. Useful if constantly querying for fresh download stats. Otherwise, we request that you save our database a few calls. |
| `offset` | query | integer | no | Determines the offset of items to get from the database. Default is 0. Optional. |
| `limit` | query | integer | no | Determines the number of items to recieve per request. Default is 1000. Optional. |
| `files` | query | boolean | no | Exclude files from response. Optional |
| `active` | query | boolean | no | Shows only active downloads. Optional |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Web Download Cached Availability

`GET https://api.torbox.app/v1/api/webdl/checkcached`

- Operation ID: `get_web_download_cached_availability`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated usenet hashes and checks if the web download is cached. This endpoint only gets a max of around 100 at a time, due to http limits in queries. If you want to do more, you can simply do more hash queries. Such as:
`?hash=XXXX&hash=XXXX&hash=XXXX`

or `?hash=XXXX,XXXX&hash=XXXX&hash=XXXX,XXXX`
and this will work too. Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

To get the hash of a web download you can read [this document](https://support.torbox.app/en/articles/13681109-technical-getting-hashes-for-searches) for all of the strategies.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no | The list of web hashes you want to check. Comma seperated. To find the hash, md5 the link. |
| `format` | query | string | no | Format you want the data in. Acceptable is either "object" or "list". List is the most performant option as it doesn't require modification of the list. |
| `list_files` | query | boolean | no | Allows you to list the files found inside the cached data. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Web Download Cached Availability Batch

`POST https://api.torbox.app/v1/api/webdl/checkcached`

- Operation ID: `get_web_download_cached_availability_batch`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated hashes and checks if the torrent is cached. With the POST endpoint you can submit a nearly unlimited hashes compared to the GET endpoint which is limited by url parameters.

Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no |  |
| `format` | query | string | no | Format you want the data in. Acceptable is either "object" or "list". List is the most performant option as it doesn't require modification of the list. |
| `list_files` | query | boolean | no | Allows you to list the files found inside the cached data. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Hoster List

`GET https://api.torbox.app/v1/api/webdl/hosters`

- Operation ID: `get_hoster_list`
- Group: Web Downloads (Debrid)
- Auth: none

### Overview

A dynamic list of hosters that TorBox is capable of downloading through its paid service.

- **Name** - a clean name for display use, the well known name of the service, should be recognizable to users.

- **Domains** - an array of known domains that the hoster uses. While each may serve a different purpose it is still included.

- **URL** - the main url of the service. This should take you to the home page or a service page of the hoster.

- **Icon** - a square image, usually a favicon or logo, that represents the service, should be recognizable as the hoster's icon.

- **Status** - whether this hoster can be used on TorBox or not at the current time. It is usually a good idea to check this value before submitting a download to TorBox's servers for download.

- **Type** - values are either "hoster" or "stream". Both do the same thing, but is good to differentiate services used for different things.

- **Note** - a string value (or null) that may give helpful information about the current status or state of a hoster. This can and should be shown to end users.

- **Daily Link Limit** - the number of downloads a user can use per day. As a user submits links, once they hit this number, the API will deny them from adding anymore of this type of link. A zero value means that it is unlimited.

- **Daily Link Used** - the number of downloads a user has already used. Usually zero unless you send authentication to the endpoint. This will return accurate values.

- **Daily Bandwidth Limit** - the value in bytes that a user is allowed to download from this hoster. A zero value means that it is unlimited. It is recommended to use the Daily Link Limit instead.

- **Daily Bandwidth Used** - the value in bytes that a user has already used to download from this hoster. Usually zero unless you send authentication to the endpoint. This will return accurate values.


### Authorization

Optional authorization. Authorization is not required in this endpoint unless you want to get the user's live data. Requires an API key using the Authorization Bearer Header to get the live and accurate data for **Daily Link Used** and **Daily Bandwidth Used**.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `503` Service Unavailable


---

## Edit Web Download Item

`PUT https://api.torbox.app/v1/api/webdl/editwebdownload`

- Operation ID: `edit_web_download_item`
- Group: Web Downloads (Debrid)
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Updates a download item based on the item's ID.
Sending a PUT request with valid items overwrites the previous items entirely, so use this endpoint with caution. Please make sure to read the restrictions below as they are important.

### Restrictions

- Does not affect the cached database (or any other user's item).

- Name must pass validation:

    - Above 1 character long.

    - Below 200 characters long.

    - Cannot contain any non-url or non filesystem safe characters. (This is removed automatically).

    - Cannot contain any leading or trailing whitespace. You can have spaces in the middle. (This is removed automatically).

- Tags follow the same rules as the name.

- Alternative hashes must be of MD5, SHA1, or SHA256.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `webdl_id` | integer | yes |  |
| `name` | string | no |  |
| `tags` | string[] | no |  |
| `alternative_hashes` | string[] | no |  |
| `airlocked` | boolean | no |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Create Usenet Download

`POST https://api.torbox.app/v1/api/usenet/createusenetdownload`

- Operation ID: `create_usenet_download`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a usenet download under your account. Simply send **either** a link, or an nzb file. Once they have been checked, they will begin downloading assuming your account has available active download slots, and they aren't too large.

#### Post Processing Options:

All post processing options that the Usenet client will perform before TorBox's own processing to make the files available. It is recommended you either don't send this parameter, or keep it at `-1` for default, which will give only the wanted files.

- `-1`, Default. This runs repairs, and extractions as well as deletes the source files leaving only the wanted downloaded files.

- `0`, None. No post-processing at all. Just download all the files (including all PAR2). TorBox will still do its normal processing to make the download available, but no repairs, or extraction will take place.

- `1`, Repair. Download files and do a PAR2 verification. If the verification fails, download more PAR2 files and attempt to repair the files.

- `2`, Repair and Unpack. Download all files, do a PAR2 verification and unpack the files. The final folder will also include the RAR and ZIP files.

- `3`, Repair, Unpack and Delete. Download all files, do a PAR2 verification, unpack the files to the final folder and delete the source files.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`multipart/form-data`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `link` | string | no | An accessible link to an NZB file. Cannot be a redirection. Optional. |
| `file` | string | no | An NZB File. Optional. |
| `name` | string | no | The name you want the usenet download to be. Optional. |
| `password` | string | no | The password to send to the Usenet client. This is used for extracting the RAR at the end. Optional. |
| `post_processing` | integer | no | The post processing option to use. Read the overview for the options. Default is -1. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this usenet download.instantly queued. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Async Create Usenet Download

`POST https://api.torbox.app/v1/api/usenet/asynccreateusenetdownload`

- Operation ID: `async_create_usenet_download`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a usenet download asynchronously under your account. Simply send **either** a link, or an nzb file. Once they have been checked, they will begin downloading assuming your account has available active download slots, and they aren't too large.

The request will return instantly, not returning any data other than a success message. This is the same for failures, as they will return the error in the background as a notification, rather than immediately.

The post processing options are the same as for the Create Usenet Download endpoint.

### Rate Limits

This endpoint is rate limited to **60 requests per hour** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`multipart/form-data`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `link` | string | no | An accessible link to an NZB file. Cannot be a redirection. Optional. |
| `file` | string | no | An NZB File. Optional. |
| `name` | string | no | The name you want the usenet download to be. Optional. |
| `password` | string | no | The password to send to the Usenet client. This is used for extracting the RAR at the end. Optional. |
| `post_processing` | integer | no | The post processing option to use. Read the overview of the Create Usenet Download endpoint for the options. Default is -1. Optional. |
| `as_queued` | boolean | no | Tells TorBox you want this usenet download instantly queued. Optional. |
| `add_only_if_cached` | boolean | no | Only adds the download if it is cached on TorBox. If not cached, it won't be added. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control Usenet Download

`POST https://api.torbox.app/v1/api/usenet/controlusenetdownload`

- Operation ID: `control_usenet_download`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls a usenet download. By sending the usenet download's ID and the type of operation you want to perform, it will send that request to the usenet client.

Operations are either:

- **Delete** `deletes the nzb from the client and your account permanently`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | the operation you want to perform on the usenet download. Can be "delete", "pause" or "resume". |
| `usenet_id` | integer | no | the usenet download's id, optional if using the "all" parameter. |
| `all` | boolean | no | if you want to do this operation to all usenet downloads in your account, optional if using the "usenet_id" parameter |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Link

`GET https://api.torbox.app/v1/api/usenet/requestdl`

- Operation ID: `request_usenet_download_link`
- Group: Usenet
- Auth: API key as the `token` query parameter

### Overview

Requests the download link from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Permalinks

Instead of generating many CDN urls by requesting this endpoint, you can instead create a permalink such as: `https://api.torbox.app/v1/api/torrents/requestdl?token=APIKEY&torrent_id=NUMBER&file_id=NUMBER&redirect=true` and when a user clicks on it, it will automatically redirect them to the CDN link. This saves requests and doesn't abuse the API. Use this method rather than saving CDN links as they are not permanent. To invalidate these permalinks, simply reset your API token or delete the item from your dashboard.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `usenet_id` | query | integer | yes | The usenet download's ID that you want to download |
| `file_id` | query | integer | no | The files's ID that you want to download. Optional if using "zip_link". |
| `zip_link` | query | boolean | no | If you want a zip link. Required if no file_id. Takes precedence over file_id if both are given. |
| `user_ip` | query | string | no | The user's IPv4 to determine the closest CDN. Optional. |
| `redirect` | query | boolean | no | If you want to redirect the user to the CDN link. This is useful for creating permalinks so that you can just make this request URL the link. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Request Download Links - GET

`GET https://api.torbox.app/v1/api/usenet/requestdl/batch`

- Operation ID: `request_usenet_download_links_get`
- Group: Usenet
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `usenet_id` | query | integer | yes | The usenet download's ID that you want to download |
| `file_ids` | query | integer[] | no | The files's ID that you want to download |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Request Download Links - POST

`POST https://api.torbox.app/v1/api/usenet/requestdl/batch`

- Operation ID: `request_usenet_download_links_post`
- Group: Usenet
- Auth: API key as the `token` query parameter

### Overview

Requests multiple download links from the server. Because downloads are metered, TorBox cannot afford to allow free access to the links directly. This endpoint opens the link for 3 hours for downloads. Once a download is started, the user has nearly unlilimited time to download the file. The 1 hour time limit is simply for starting downloads. This prevents long term link sharing.

### Authorization

Requires an API key as a parameter for the `token` parameter.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | Your API Key |
| `usenet_id` | query | integer | yes | The usenet downloads' ID that you want to download |
| `file_ids` | query | integer[] | no |  |
| `user_ip` | query | string | no | The user's IP to determine the closest CDN. Optional. |
| `append_name` | query | boolean | no | If you want to add the "filename" parameter to the returned CDN link. Optional. Default false. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `file_ids` | integer[] | no | The files's ID that you want to download |

## Responses

- `200` Successful Response
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Get Usenet List

`GET https://api.torbox.app/v1/api/usenet/mylist`

- Operation ID: `get_usenet_list`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the user's usenet download list. This gives you the needed information to perform other usenet actions. Unlike Torrents, this information is updated on its own every 5 seconds for live usenet downloads.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | no | Determines the usenet download requested, will return an object rather than list. Optional. |
| `bypass_cache` | query | boolean | no | Allows you to bypass the cached data, and always get fresh information. Useful if constantly querying for fresh download stats. Otherwise, we request that you save our database a few calls. |
| `offset` | query | integer | no | Determines the offset of items to get from the database. Default is 0. Optional. |
| `limit` | query | integer | no | Determines the number of items to recieve per request. Default is 1000. Optional. |
| `files` | query | boolean | no | Exclude files from response. Optional |
| `active` | query | boolean | no | Shows only active downloads. Optional |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Usenet Cached Availability

`GET https://api.torbox.app/v1/api/usenet/checkcached`

- Operation ID: `get_usenet_cached_availability`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated usenet hashes and checks if the usenet download is cached. This endpoint only gets a max of around 100 at a time, due to http limits in queries. If you want to do more, you can simply do more hash queries. Such as:
`?hash=XXXX&hash=XXXX&hash=XXXX`

or `?hash=XXXX,XXXX&hash=XXXX&hash=XXXX,XXXX`
and this will work too. Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

To get the hash of a usenet download, you can read [this document](https://support.torbox.app/en/articles/13681109-technical-getting-hashes-for-searches) for all of the strategies.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no | The list of usenet hashes you want to check. Comma seperated. To find the hash, md5 the link of the usenet link or file. |
| `format` | query | string | no | Format you want the data in. Acceptable is either "object" or "list". List is the most performant option as it doesn't require modification of the list. |
| `list_files` | query | boolean | no | Allows you to list the files found inside the cached data. Optional. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Usenet Cached Availability Batch

`POST https://api.torbox.app/v1/api/usenet/checkcached`

- Operation ID: `get_usenet_cached_availability_batch`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Takes in a list of comma separated hashes and checks if the torrent is cached. With the POST endpoint you can submit a nearly unlimited hashes compared to the GET endpoint which is limited by url parameters.

Performance is very fast. Less than 1 second per 100. Time is approximately O(log n) time for those interested in taking it to its max. That is without caching as well. This endpoint stores a cache for an hour.

You may also pass a `format` parameter with the format you want the data in. Options are either `object` or `list`. You can view examples of both below.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | query | string[] | no |  |
| `format` | query | string | no |  |
| `list_files` | query | boolean | no |  |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hashes` | string[] | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get News Server Connection Information

`GET https://api.torbox.app/v1/api/usenet/provider/connection`

- Operation ID: `get_news_server_connection_information`
- Group: Usenet
- Auth: none

### Overview

Gets the TorBox News Server Connection information. This is a static path, and is not dynamic.

### Authorization

No authentication required.

## Responses

- `200` Successful Response
- `404` Not Found
- `429` Too Many Requests


---

## Get News Server Account

`GET https://api.torbox.app/v1/api/usenet/provider/account`

- Operation ID: `get_news_server_account`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the user's TorBox News Server Account with authentication details. Does not show password if not creating the account. Account creation happens on the first request. If you need to get the password, or reset the password, use the `/usenet/provider/account/resetpw` `POST` endpoint.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Reset News Server Account Password

`POST https://api.torbox.app/v1/api/usenet/provider/account/resetpw`

- Operation ID: `reset_news_server_account_password`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Resets the user's TorBox News Server account password. This password is automatically generated, and is not saved, it is only shown once.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Edit Usenet Item

`PUT https://api.torbox.app/v1/api/usenet/editusenetdownload`

- Operation ID: `edit_usenet_item`
- Group: Usenet
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Updates a download item based on the item's ID.
Sending a PUT request with valid items overwrites the previous items entirely, so use this endpoint with caution. Please make sure to read the restrictions below as they are important.

### Restrictions

- Does not affect the cached database (or any other user's item).

- Name must pass validation:

    - Above 1 character long.

    - Below 200 characters long.

    - Cannot contain any non-url or non filesystem safe characters. (This is removed automatically).

    - Cannot contain any leading or trailing whitespace. You can have spaces in the middle. (This is removed automatically).

- Tags follow the same rules as the name.

- Alternative hashes must be of MD5, SHA1, or SHA256.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `usenet_download_id` | integer | yes |  |
| `name` | string | no |  |
| `tags` | string[] | no |  |
| `alternative_hashes` | string[] | no |  |
| `airlocked` | boolean | no |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Add RSS Feed

`POST https://api.torbox.app/v1/api/rss/addrss`

- Operation ID: `add_rss_feed`
- Group: RSS Feeds
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Allows adding an RSS feed to your account. This API gives you a lot of customization options, but is best used with the UI on the website. This endpoint only works for Pro users (plan: 2).

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | URL of the rss feed you want to add. |
| `name` | string | yes | Display name of the rss feed you want to add. |
| `do_regex` | string | no | Regex of items you want to make sure are added. Optional. |
| `dont_regex` | string | no | Regex of items you dont want added. Optional. |
| `dont_older_than` | integer | no | Time in days that tells the parser to skip if the torrent is older than that many days. Optional. |
| `pass_check` | boolean | no | Boolean which tells to allow multiple of the same url if it already exists on your account |
| `scan_interval` | integer | no | Time in minutes with the minimum being 10 which you want the api to scan in interval. Optional. Default is 60. |
| `rss_type` | string | no | The type of downloads inside of this RSS feed. Optional. Default is torrent. Options are "torrent", "usenet", "webdl" |
| `torrent_seeding` | integer | no | Determines if torrents inside of this RSS feed will seed or not. Optional. Default is 1, for auto. Options are 1 for auto, 2 for always, and 3 for never. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control RSS Feed

`POST https://api.torbox.app/v1/api/rss/controlrss`

- Operation ID: `control_rss_feed`
- Group: RSS Feeds
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls an RSS Feed. By sending the RSS feed's ID and the type of operation you want to perform, it will perform said action on the RSS feed checker.

Operations are either:

- **Update** `forces an update on the rss feed`
- **Delete** `deletes the rss feed from your account permanently. This also deletes all associated RSS feed items. This does not remove queued items spawned from the RSS feed.`
- **Pause** `pauses checking the rss feed on the scan interval`
- **Resume** `resumes a paused rss feed`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | The operation you want to perform on the RSS feed. Options are 'update', 'delete', 'resume' and 'pause'. |
| `rss_feed_id` | integer | yes | The ID of the RSS feed you want to perform the operation on. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Edit RSS Feed

`POST https://api.torbox.app/v1/api/rss/modifyrss`

- Operation ID: `edit_rss_feed`
- Group: RSS Feeds
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Allows you to edit the RSS feed based on the RSS feed ID passed. Allows you to change everything about an RSS feed, except for the URL.

When updating the "rss_type" or the "torrent_seeding" options, it will update all of the RSS items associated with the RSS feed, including all previous items.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rss_feed_id` | integer | yes | The ID of the RSS feed you want to modify. |
| `name` | string | no | Display name of the rss feed you want to add. |
| `do_regex` | string | no | Regex of items you want to make sure are added. Optional. |
| `dont_regex` | string | no | Regex of items you dont want added. Optional. |
| `scan_interval` | integer | no | Time in minutes with the minimum being 10 which you want the api to scan in interval. Optional. Default is 60. |
| `dont_older_than` | integer | no | Time in days that tells the parser to skip if the torrent is older than that many days. Optional. |
| `rss_type` | string | no | The type of downloads inside of this RSS feed. Optional. Default is torrent. Options are "torrent", "usenet", "webdl" |
| `torrent_seeding` | integer | no | Determines if torrents inside of this RSS feed will seed or not. Optional. Default is 1, for auto. Options are 1 for auto, 2 for always, and 3 for never. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get User RSS Feeds

`GET https://api.torbox.app/v1/api/rss/getfeeds`

- Operation ID: `get_user_rss_feeds`
- Group: RSS Feeds
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets all of a user's RSS feeds located on their account. Can only be accessed on a Pro (plan: 2) account. Also allows you to get a specific by passing an "id" in the parameters.

##### Type Key

The "type" key in the response is used for showing what type of downloads are spawned from this RSS feed. This affects how the item is downloaded, as well as what is scraped, so make sure it is correct.

- **"**torrent**"** `uses .torrent files and magnet links and adds as torrent when downloaded.`
- "usenet" `uses .nzb files and nzb links and adds as a usenet download when downloaded.`
- "webdl" `uses generic links and adds as a web download when downloaded.`


##### Status Key

The "status" key tells the user selected status of the RSS feed. These statuses are **not** the same as the status key for the RSS items associated with the RSS feed. Each feed also includes a "status_message" key which gives a user friendly message about anything about the RSS feed, such as errors and explainations.

- "active" `the RSS feed is set to be scraped.`
- "paused" `the RSS feed will not be scraped as it is paused by the user.`

- "error" `the RSS feed had an error while scraping, and cannot continue.`


##### State Key

The "state" key tells you exactly in real time, what the RSS feed is doing. This is useful for realtime status updates.

- "idle" `the RSS feed is idle, and is currently not doing anything in the current moment.`
- "scraping" `the RSS feed is currently scraping new RSS items.`
- "downloading" `the RSS feed is currently downloading the newly scraped RSS items.`


##### Torrent Seeding Key

The "torrent_seeding" key is returned with every response, regardless of the type of the RSS feed. This controls what seeding setting the RSS feed is using when it adds new torrents. These are the same options as when adding a torrent using the /torrent/createtorrent endpoint.

> Tells TorBox your preference for seeding this torrent. 1 is auto. 2 is seed. 3 is don't seed. Optional. Default is 1, or whatever the user has in their settings. Overwrites option in settings.


- 1 `auto, the torrent will seed based on what the user has in their settings.`
- 2 `always, TorBox will be instructed to seed this torrent regardless of any other settings.`
- 3 `never, TorBox will not seed this torrent.`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | no | A specific RSS feed ID that you want to retrieve. Optional. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get RSS Feed Items

`GET https://api.torbox.app/v1/api/rss/getfeeditems`

- Operation ID: `get_rss_feed_items`
- Group: RSS Feeds
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the first 10,000 RSS feed items associated with an RSS feed. RSS feed items are scraped items from the RSS feed. They contain a direct download link as well as the content name, and additional information.

##### Type Key

The "type" key in the response is used for showing what type of downloads this RSS feed item is. This affects how the item is downloaded, as well as what is scraped, so make sure it is correct. When the parent RSS feed's type is changed, it changes all of the items types as well.

- **"**torrent**"** `uses .torrent files and magnet links and adds as torrent when downloaded.`
- "usenet" `uses .nzb files and nzb links and adds as a usenet download when downloaded.`
- "webdl" `uses generic links and adds as a web download when downloaded.`


##### Status Key

The "status" key tells the status of the RSS feed item. This is useful for seeing what the item is doing, and what it will do next. Each item also includes a "status_message" key which gives a user friendly message about anything about the RSS feed item, such as errors and explainations.

- "new" `the RSS feed item is set to be downloaded.`
- "ignored" `the RSS feed item has been ignored due to the parents RSS feed settings, as it doesn't match the chosen settings. The item will not be downloaded.`
- "error" `the RSS feed item had an error while attempting to download. The item will be retried on the next scrape.`
- "downloaded" `the RSS feed item has already been downloaded to the user's account. It will not be downloaded again.`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `rss_feed_id` | query | integer | yes | The RSS Feed ID of the RSS Feed you want to retrieve the scraped items of. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Create Stream

`GET https://api.torbox.app/v1/api/stream/createstream`

- Operation ID: `create_stream`
- Group: Stream
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Creates a new stream based off of the data provided.

#### Selecting Subtitles and Audios

We use indexes to determine which audio and subtitle you would like to select. To view all available indexes, you must request this endpoint intially with "null" or 0, for the chosen indexes. This will return a metadata dictionary in the response, which will contain the list of audios and subtitles available for this stream. When choosing a subtitle or audio stream, use the **relative index**, starting from 0, rather than the "index" value. This is important for selecting the correct index. Once your user gets a selection of audios and subtitles available, you can submit this to the endpoint again to get the chosen stream.

- **null** - Selecting no subtitle. Not available for audio as one must always be selected.

- **0** - Selecting first subtitle or audio


#### Selecting Resolution

Similar to the subtitles and audios, we use indexes to determine the resolution chosen. Unlike the above, these are predetermined. We do not upscale video, so if for example, you pass a 1080p video, and request it with resolution, 7, it will stay at 1080p. Please see the below for options.

- **null** - Original video resolution. No downscaling will take place.

- **0** - 144p

- **1** - 240p

- **2** - 360p

- **3** - 480p

- **4** - 720p

- **5** - 1080p

- **6** - 1440p

- **7** - 2160p


#### Types

This endpoint allows you to handle torrents, usenet and web downloads all in one. This is why the "type" parameter is available. It defaults to "torrent".

- **torrent** - Torrents

- **usenet** - Usenet downloads

- **webdownload** - Web Downloads


#### Important Notes

- Only text based subtitles are supported. If a non-text based subtitle is selected, it will be ignored.

- If a subtitle or audio index does not exist on the stream, it will be ignored.

- There are a lot of edge-case videos, if something doesn't work, don't hesitate to report the download hash and file_id of the failing video file.

- This is a **Pro** only feature.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | yes | The ID of the type of download. |
| `file_id` | query | integer | no | The file ID inside of the download you would like to stream. |
| `type` | query | string | no | The type of download that this is. If choosing the incorrect one, the ID will be incorrect. |
| `chosen_subtitle_index` | query | any | no | The relative index of the subtitle you would like to stream. This is default null for none. 0 is the first subtitle found. |
| `chosen_audio_index` | query | integer | no | The relative index of the subtitle you would like to stream. Defaults to 0 for the first audio stream found inside the file. Cannot be null. |
| `chosen_resolution_index` | query | any | no | The index of the resolution you would like to stream. This is default null for original. |
| `scrobbling_enabled` | query | boolean | no |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Stream Data

`GET https://api.torbox.app/v1/api/stream/getstreamdata`

- Operation ID: `get_stream_data`
- Group: Stream
- Auth: API key as the `token` query parameter

### Overview

Gets stream data from an already created stream. Requires the presigned token and user API token from the original request.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | The user's API token, can also be used from the original, /createstream request. |
| `presigned_token` | query | string | yes | The presigned token given from the original, /createstream request. |
| `chosen_subtitle_index` | query | any | no | The chosen subtitle index that you are requesting information about. |
| `chosen_audio_index` | query | integer | no | The chosen audio index that you are requesting information about. |
| `chosen_resolution_index` | query | any | no | The index of the resolution you would like to stream. This is default null for original. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get OAuth Integrations

`GET https://api.torbox.app/v1/api/integration/oauth/me`

- Operation ID: `get_oauth_integrations`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Shows which tracking services are linked to your account through an OAuth link. `data` has one boolean for each of `trakt`, `mal`, `anilist` and `simkl`, true when a link for that service is stored on your account. A link is stored with Register OAuth Link and removed with Unregister OAuth Link.

Only these four services are reported. A link for any other provider that Register OAuth Link accepts, such as `discord`, is not part of the answer. The answer also does not say whether a stored token still works. If the lookup itself fails, `data` is an empty object under the same success message.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Authenticate OAuth

`GET https://api.torbox.app/v1/api/integration/oauth/{provider}`

- Operation ID: `authenticate_oauth`
- Group: Integrations
- Auth: none

### Overview

Starts the OAuth login with another service. This is a browser redirect, not a call for a script: open it in the user's browser. It answers with a redirect to the login page of the service named in `provider`. When the user has approved, the service sends the browser back to the callback route of this API, `https://api.torbox.app/v1/api/integration/oauth/{provider}/callback`, which finishes the login.

The accepted providers and where the browser is sent:

- `google` -> `https://accounts.google.com/o/oauth2/auth`, asking for the scopes `https://www.googleapis.com/auth/drive.file` and `https://www.googleapis.com/auth/userinfo.email`
- `dropbox` -> `https://www.dropbox.com/oauth2/authorize`, asking for `files.content.write sharing.write`
- `discord` -> `https://discord.com/api/oauth2/authorize`, asking for `identify role_connections.write`
- `onedrive` -> `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`, asking for `files.readwrite.all`
- `patreon` -> `https://www.patreon.com/oauth2/authorize`, asking for `identity`
- `apple` -> the Apple sign-in page, asking for `openid email`. Apple is asked to send the result back as a form POST.
- `anilist` -> `https://anilist.co/api/v2/oauth/authorize`
- `mal` -> `https://myanimelist.net/v1/oauth2/authorize`, asking for `write:users`
- `trakt` -> `https://trakt.tv/oauth/authorize`
- `simkl` -> `https://simkl.com/oauth/authorize`

Any other provider is answered with a JSON error instead of a redirect.

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service to log in with. One of `google`, `dropbox`, `discord`, `onedrive`, `patreon`, `apple`, `anilist`, `mal`, `trakt` or `simkl`. |

## Responses

- `302` Found
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## OAuth Callback Get

`GET https://api.torbox.app/v1/api/integration/oauth/{provider}/callback`

- Operation ID: `oauth_callback_get`
- Group: Integrations
- Auth: none

### Overview

The address a service sends the user's browser back to after the login started by Authenticate OAuth. It is reached by the browser on its way back from the service, not called by you. The service adds its `code` and `state` to the query string.

TorBox exchanges the code for the service's tokens, looks up who the user is at that service, and redirects the browser to the TorBox website with the result in the query string:

`https://torbox.app/oauth/{provider}/success?token=...&expires_in=...&expires_at=...&user_id=...&id_token=...&nonce=...&refresh_token=...`

- `token` -> the access token the service issued
- `refresh_token` -> the refresh token the service issued
- `expires_in`, `expires_at` -> as found in the service's token answer
- `user_id` -> who the user is at the service. The email address for `google` and `apple`, the `email` field of the Discord user for `discord`, the user id for `patreon`, `anilist` and `mal`, the user name for `trakt` and `simkl`. Not set for `dropbox` and `onedrive`.
- `id_token` -> the ID token for `google` and `apple`, the Discord user id for `discord`. Not set for the other providers.
- `nonce` -> the name of the provider

A value the service did not give is sent as the text `None`.

This route stores nothing on a TorBox account. The tokens it hands over are the ones Register OAuth Link, Link Discord Roles and the upload routes take.

If the login was cancelled, has expired or fails, the route answers with a JSON error instead of a redirect.

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service the login was started with. One of `google`, `dropbox`, `discord`, `onedrive`, `patreon`, `apple`, `anilist`, `mal`, `trakt` or `simkl`. |

## Responses

- `302` Found
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## OAuth Callback Post

`POST https://api.torbox.app/v1/api/integration/oauth/{provider}/callback`

- Operation ID: `oauth_callback_post`
- Group: Integrations
- Auth: none

### Overview

The same callback as OAuth Callback Get, for a service that sends the browser back with a form POST instead of a GET. Apple does this: the login for `apple` asks for the result as a form POST, and this route reads the form fields `state` and `code` from it. It is reached by the browser on its way back from the service, not called by you.

TorBox exchanges the code for the service's tokens, looks up who the user is at that service, and redirects the browser to the TorBox website with the result in the query string:

`https://torbox.app/oauth/{provider}/success?token=...&expires_in=...&expires_at=...&user_id=...&id_token=...&nonce=...&refresh_token=...`

The query parameters are the ones described under OAuth Callback Get. For `apple`, `user_id` is the email address from Apple's ID token and `id_token` is that ID token. A value the service did not give is sent as the text `None`.

This route stores nothing on a TorBox account. If the login was cancelled, has expired or fails, the route answers with a JSON error instead of a redirect.

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service the login was started with. One of `google`, `dropbox`, `discord`, `onedrive`, `patreon`, `apple`, `anilist`, `mal`, `trakt` or `simkl`. |

## Responses

- `302` Found
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## OAuth Success

`GET https://api.torbox.app/v1/api/integration/oauth/{provider}/success`

- Operation ID: `oauth_success`
- Group: Integrations
- Auth: none

### Overview

Answers with a fixed success message for the providers `google`, `dropbox`, `discord`, `onedrive` and `patreon`. It reads nothing but the provider name and hands over no token: `data` is always null. Any other provider is answered with a JSON error.

This is not where the OAuth callback redirects to. The callback sends the browser to the page with the same path on the TorBox website, `https://torbox.app/oauth/{provider}/success`, with the tokens in the query string. This route on the API takes no part in handing them over.

### Authorization

None required.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service. One of `google`, `dropbox`, `discord`, `onedrive` or `patreon`. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error


---

## Upload To Google Drive

`POST https://api.torbox.app/v1/api/integration/googledrive`

- Operation ID: `upload_to_google_drive`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Uploads a file, or a zip of a whole download, from your TorBox account to a Google Drive. Send the `id` of the torrent, usenet download or web download, its `type`, and either the `file_id` of one file or `zip` set to true. In `google_token` you send a Google OAuth access token for the Drive to upload to. The login started by Authenticate OAuth with the provider `google` asks Google for the `drive.file` scope and ends with such a token.

The route answers at once with a `job_id`. The upload itself runs in the background as a transfer job, and nothing is checked with Google before the answer, so a token Google does not accept only shows up as a failed job. Follow the job with Get Specific Job (`/v1/api/integration/job/{job_id}`), Get All Jobs (`/v1/api/integration/jobs`) or Get All Jobs By Hash (`/v1/api/integration/jobs/{hash}`), and stop it with Cancel Specific Job.

The job goes from "pending" through "preparing" and "uploading" to "completed" or "failed". Its `detail` says what it is doing or why it failed, and its `progress` runs from 0 to 1. When it is completed, its `download_url` is the link to the file on Google Drive and you get an "Upload Complete" notification. A failed job is deleted about an hour after it failed, a completed job about 7 days after it completed.

The download has to be cached on TorBox, otherwise the job fails. If you send neither `file_id` nor `zip`, the request is still queued, but there is no file to upload and the job fails. If your settings have a `google_drive_folder_id`, the file is put in that folder.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download to upload. It has to be one of your own downloads. Required. |
| `file_id` | integer | no | Id of the file to upload, from the download's files. Leave out when `zip` is true. |
| `zip` | boolean | no | Upload the whole download as one zip instead of a single file. Takes precedence over `file_id`. Optional, default false. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. |
| `google_token` | string | yes | Google OAuth access token for the Drive to upload to. It is issued by Google, not by TorBox. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Upload To Dropbox

`POST https://api.torbox.app/v1/api/integration/dropbox`

- Operation ID: `upload_to_dropbox`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)
- **Deprecated**

### Overview

The Dropbox integration has been removed from TorBox. The route still exists, but it no longer uploads anything and never starts a transfer job. After the API key and the `type` are checked, every request is answered with status 400, the error `DIFF_ISSUE` and the detail "Dropbox integration has been removed from TorBox."

The body fields are still read, so they are listed here, but none of them changes the answer. Use one of the other upload routes instead.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download. Still required by the route, but no longer used. |
| `file_id` | integer | no | Id of the file inside the download. No longer used. |
| `zip` | boolean | no | Whether to upload the whole download as one zip. No longer used. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. Still checked before the route answers. |
| `dropbox_token` | string | yes | Dropbox OAuth access token. Still required by the route, but no longer used. |

## Responses

- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Upload To OneDrive

`POST https://api.torbox.app/v1/api/integration/onedrive`

- Operation ID: `upload_to_onedrive`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Uploads a file, or a zip of a whole download, from your TorBox account to a OneDrive. Send the `id` of the torrent, usenet download or web download, its `type`, and either the `file_id` of one file or `zip` set to true. In `onedrive_token` you send a OneDrive (Microsoft) OAuth access token for the drive to upload to. The login started by Authenticate OAuth with the provider `onedrive` asks Microsoft for the `files.readwrite.all` scope and ends with such a token.

The route answers at once with a `job_id`. The upload itself runs in the background as a transfer job, and nothing is checked with OneDrive before the answer, so a token OneDrive does not accept only shows up as a failed job. Follow the job with Get Specific Job (`/v1/api/integration/job/{job_id}`), Get All Jobs (`/v1/api/integration/jobs`) or Get All Jobs By Hash (`/v1/api/integration/jobs/{hash}`), and stop it with Cancel Specific Job.

The job goes from "pending" through "preparing" and "uploading" to "completed" or "failed". Its `detail` says what it is doing or why it failed, and its `progress` runs from 0 to 1. When it is completed, its `download_url` is the link to the file on OneDrive and you get an "Upload Complete" notification. A failed job is deleted about an hour after it failed, a completed job about 7 days after it completed.

The download has to be cached on TorBox, otherwise the job fails. If you send neither `file_id` nor `zip`, the request is still queued, but there is no file to upload and the job fails. The file is saved under the `onedrive_save_path` of your settings, or in the root of the drive when that setting is empty. A file with the same name in that place is replaced.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download to upload. It has to be one of your own downloads. Required. |
| `file_id` | integer | no | Id of the file to upload, from the download's files. Leave out when `zip` is true. |
| `zip` | boolean | no | Upload the whole download as one zip instead of a single file. Takes precedence over `file_id`. Optional, default false. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. |
| `onedrive_token` | string | yes | OneDrive OAuth access token for the drive to upload to. It is issued by Microsoft, not by TorBox. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Upload To Gofile

`POST https://api.torbox.app/v1/api/integration/gofile`

- Operation ID: `upload_to_gofile`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Uploads a file, or a zip of a whole download, from your TorBox account to Gofile. Send the `id` of the torrent, usenet download or web download, its `type`, and either the `file_id` of one file or `zip` set to true. `gofile_token` is optional: with it the upload is made with that Gofile account's API token, without it the upload is sent without a Gofile login.

The route answers at once with a `job_id`. The upload itself runs in the background as a transfer job, and nothing is checked with Gofile before the answer, so a token Gofile does not accept only shows up as a failed job. Follow the job with Get Specific Job (`/v1/api/integration/job/{job_id}`), Get All Jobs (`/v1/api/integration/jobs`) or Get All Jobs By Hash (`/v1/api/integration/jobs/{hash}`), and stop it with Cancel Specific Job.

The job goes from "pending" through "preparing" and "uploading" to "completed" or "failed". Its `detail` says what it is doing or why it failed, and its `progress` runs from 0 to 1. When it is completed, its `download_url` is the Gofile download page of the file and you get an "Upload Complete" notification. A failed job is deleted about an hour after it failed, a completed job about 7 days after it completed.

The download has to be cached on TorBox, otherwise the job fails. If you send neither `file_id` nor `zip`, the request is still queued, but there is no file to upload and the job fails. If your settings have a `gofile_folder_id`, the file is put in that folder, but only when a `gofile_token` is sent.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download to upload. It has to be one of your own downloads. Required. |
| `file_id` | integer | no | Id of the file to upload, from the download's files. Leave out when `zip` is true. |
| `zip` | boolean | no | Upload the whole download as one zip instead of a single file. Takes precedence over `file_id`. Optional, default false. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. |
| `gofile_token` | string | no | Gofile API token of the account to upload to. It is issued by Gofile, not by TorBox. Optional. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Upload To 1Fichier

`POST https://api.torbox.app/v1/api/integration/1fichier`

- Operation ID: `upload_to_1fichier`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Uploads a file, or a zip of a whole download, from your TorBox account to 1Fichier. Send the `id` of the torrent, usenet download or web download, its `type`, and either the `file_id` of one file or `zip` set to true. `onefichier_token` is optional: with it the upload is made with that 1Fichier account's API token, without it the upload is sent without a 1Fichier login.

The route answers at once with a `job_id`. The upload itself runs in the background as a transfer job, and nothing is checked with 1Fichier before the answer, so a token 1Fichier does not accept only shows up as a failed job. Follow the job with Get Specific Job (`/v1/api/integration/job/{job_id}`), Get All Jobs (`/v1/api/integration/jobs`) or Get All Jobs By Hash (`/v1/api/integration/jobs/{hash}`), and stop it with Cancel Specific Job.

The job goes from "pending" through "preparing" and "uploading" to "completed" or "failed". Its `detail` says what it is doing or why it failed, and its `progress` runs from 0 to 1. When it is completed, its `download_url` is the 1Fichier download link of the file and you get an "Upload Complete" notification. A failed job is deleted about an hour after it failed, a completed job about 7 days after it completed.

A file larger than 2 GB (2,147,483,647 bytes) is not uploaded: the request is queued and the job fails. The download has to be cached on TorBox, otherwise the job fails. If you send neither `file_id` nor `zip`, the request is still queued, but there is no file to upload and the job fails. If your settings have a `onefichier_folder_id`, the file is put in that folder, but only when a `onefichier_token` is sent.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download to upload. It has to be one of your own downloads. Required. |
| `file_id` | integer | no | Id of the file to upload, from the download's files. Leave out when `zip` is true. |
| `zip` | boolean | no | Upload the whole download as one zip instead of a single file. Takes precedence over `file_id`. Optional, default false. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. |
| `onefichier_token` | string | no | 1Fichier API token of the account to upload to. It is issued by 1Fichier, not by TorBox. Optional. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Upload To Pixeldrain

`POST https://api.torbox.app/v1/api/integration/pixeldrain`

- Operation ID: `upload_to_pixeldrain`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Uploads a file, or a zip of a whole download, from your TorBox account to Pixeldrain. Send the `id` of the torrent, usenet download or web download, its `type`, either the `file_id` of one file or `zip` set to true, and the API key of the Pixeldrain account to upload to in `pixeldrain_token`.

The route accepts a request without `pixeldrain_token`, but nothing can be uploaded without one: the job then fails with the detail "No API key provided. Please provide an API key to upload to Pixeldrain." Only the key sent in the request is used.

The route answers at once with a `job_id`. The upload itself runs in the background as a transfer job, and nothing is checked with Pixeldrain before the answer, so a key Pixeldrain does not accept only shows up as a failed job. Follow the job with Get Specific Job (`/v1/api/integration/job/{job_id}`), Get All Jobs (`/v1/api/integration/jobs`) or Get All Jobs By Hash (`/v1/api/integration/jobs/{hash}`), and stop it with Cancel Specific Job.

The job goes from "pending" through "preparing" and "uploading" to "completed" or "failed". Its `detail` says what it is doing or why it failed, and its `progress` runs from 0 to 1. When it is completed, its `download_url` is the Pixeldrain link of the file (`https://pixeldrain.com/u/...`) and you get an "Upload Complete" notification. A failed job is deleted about an hour after it failed, a completed job about 7 days after it completed.

A file of 100 GB (107,374,182,400 bytes) or more is not uploaded: the request is queued and the job fails. The download has to be cached on TorBox, otherwise the job fails. Send `file_id` or `zip`: with neither there is no file to upload and the job never completes.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | Id of the torrent, usenet download or web download to upload. It has to be one of your own downloads. Required. |
| `file_id` | integer | no | Id of the file to upload, from the download's files. Leave out when `zip` is true. |
| `zip` | boolean | no | Upload the whole download as one zip instead of a single file. Takes precedence over `file_id`. Optional, default false. |
| `type` | string | no | Which kind of download `id` refers to. One of `torrent`, `usenet` or `webdownload`. Optional, default `torrent`. |
| `pixeldrain_token` | string | no | Pixeldrain API key of the account to upload to. It is issued by Pixeldrain, not by TorBox. The route accepts a request without it, but the job fails without it. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Specific Job

`GET https://api.torbox.app/v1/api/integration/job/{job_id}`

- Operation ID: `get_specific_job`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets a specifc job using the Job's ID. To get the ID, you will have to Get All Jobs, and get the ID you want.

### Statuses

- "pending" -> Upload is still waiting in the queue. Waiting for spot to upload.
- "uploading" -> Upload is uploading to the proper remote. Progress will be updated as upload continues.
- "completed" -> Upload has successfully been uploaded. Progress will be at 1, and the download URL will be populated.
- "failed" -> The upload has failed. Check the Detail key for information.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `job_id` | path | integer | yes |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Cancel Specific Job

`DELETE https://api.torbox.app/v1/api/integration/job/{job_id}`

- Operation ID: `cancel_specific_job`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Cancels a job or deletes the job. Cancels while in progess (pending, uploading), or deletes the job any other time. It will delete it from the database completely.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `job_id` | path | integer | yes |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get All Jobs

`GET https://api.torbox.app/v1/api/integration/jobs`

- Operation ID: `get_all_jobs`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets all the jobs attached to a user account. This is good for an overall view of the jobs, such as on a dashboard, or something similar.

### Statuses

- "pending" -> Upload is still waiting in the queue. Waiting for spot to upload.
- "uploading" -> Upload is uploading to the proper remote. Progress will be updated as upload continues.
- "completed" -> Upload has successfully been uploaded. Progress will be at 1, and the download URL will be populated.

- "failed" -> The upload has failed. Check the Detail key for information.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get All Jobs By Hash

`GET https://api.torbox.app/v1/api/integration/jobs/{hash}`

- Operation ID: `get_all_jobs_by_hash`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets all jobs that match a specific hash. Good for checking on specific downloads such as a download page, that could contain a lot of jobs.

### Statuses

- "pending" -> Upload is still waiting in the queue. Waiting for spot to upload.
- "uploading" -> Upload is uploading to the proper remote. Progress will be updated as upload continues.
- "completed" -> Upload has successfully been uploaded. Progress will be at 1, and the download URL will be populated.
- "failed" -> The upload has failed. Check the Detail key for information.


### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `hash` | path | string | yes |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Register OAuth Link

`POST https://api.torbox.app/v1/api/integration/oauth/{provider}/register`

- Operation ID: `register_oauth_link`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Stores an OAuth link to another service on your TorBox account. Send the access token and the refresh token that the service issued for the user. TorBox does not issue these tokens: they are the `token` and `refresh_token` handed over at the end of the login started by Authenticate OAuth.

Both tokens are stored encrypted. If the account already has a link for that provider, its tokens are replaced and the link is marked active again. The tokens are not checked with the service when they are registered. The stored tokens of `mal`, `trakt`, `anilist` and `discord` links are refreshed once a day with the refresh token.

Get OAuth Integrations shows whether a `trakt`, `mal`, `anilist` or `simkl` link is stored.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service to link. One of `google`, `dropbox`, `discord`, `onedrive`, `patreon`, `apple`, `anilist`, `mal`, `trakt` or `simkl`. |

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | yes | OAuth access token the service issued for the user. Required. |
| `refresh_token` | string | yes | OAuth refresh token the service issued for the user. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Unregister OAuth Link

`DELETE https://api.torbox.app/v1/api/integration/oauth/{provider}/unregister`

- Operation ID: `unregister_oauth_link`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Removes the OAuth link to a service from your TorBox account by deleting the stored tokens. The tokens are deleted from TorBox only, nothing is revoked at the service itself.

The route answers with success whether or not a link existed. It does not check the provider name either: a name that was never registered removes nothing and is still answered with success.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `provider` | path | string | yes | The service to unlink, by the name it was registered with in Register OAuth Link (`google`, `dropbox`, `discord`, `onedrive`, `patreon`, `apple`, `anilist`, `mal`, `trakt` or `simkl`). The name is not checked by the route. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Link Discord Roles

`POST https://api.torbox.app/v1/api/integration/oauth/discord/linked_roles`

- Operation ID: `link_discord_roles`
- Group: Integrations
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Updates the Discord linked roles of a user from their TorBox account. Send a Discord OAuth access token of the user in `discord_token`. The token is issued by Discord, not by TorBox: it is the `token` handed over at the end of the login started by Authenticate OAuth with the provider `discord`, which asks Discord for the `identify` and `role_connections.write` scopes.

TorBox reads the Discord user behind the token and writes the TorBox role connection of that Discord user: the platform name "TorBox", that the user has signed up, the date the TorBox account was created, and the key of the account's plan: `essential_plan` for plan 1, `pro_plan` for plan 2 or `standard_plan` for plan 3.

Once Discord has accepted the update, the Discord user id is saved as the `discord_id` of your TorBox settings. The answer carries no data.

When Discord returns no user for the token, or does not accept the update, the answer is an error and the Discord user id is not saved.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `discord_token` | string | yes | Discord OAuth access token of the user. It is issued by Discord, not by TorBox. Required. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Register Vendor

`POST https://api.torbox.app/v1/api/vendors/register`

- Operation ID: `register_vendor`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Registers a vendor account under your TorBox account. The vendor account uses your TorBox account's email, is created with the status "pending" and a newly generated vendor token, and your TorBox account is marked as a vendor. Once it is registered, a welcome email is sent to your account's email address and the TorBox team is notified of the signup.

A TorBox account can only have one vendor account, and an account that is itself owned by a vendor cannot register as a vendor.

The `vendor_url` must start with `http://` or `https://` and be a domain with an optional path. A URL with a port, a query string or a fragment is rejected.

To read the vendor account afterwards, including its id, user limit, plan and paid-until date, use the Get Vendor Account endpoint.

### Rate Limits

This endpoint is rate limited to **15 requests per hour** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Request body (`application/x-www-form-urlencoded`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vendor_name` | string | yes | Name of the vendor. Required. |
| `vendor_url` | string | yes | Website of the vendor. Must start with http:// or https:// and cannot contain a port, a query string or a fragment. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Vendor Account

`GET https://api.torbox.app/v1/api/vendors/account`

- Operation ID: `get_vendor_account`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the vendor account that is registered under your TorBox account.

##### Response Keys

- "vendor_id" `the id of the vendor account. Users owned by the vendor have this value as their "vendor_id".`
- "vendor_token" `the vendor token that was generated when the vendor account was registered.`
- "vendor_email" `the email that was on the TorBox account when the vendor account was registered.`
- "vendor_status" `the status of the vendor account. A vendor account is registered as "pending".`
- "users_allowed" `the highest number of users the vendor account may have.`
- "current_users" `the number of users currently counted against "users_allowed".`
- "can_register_new" `whether the vendor account is allowed to register users.`
- "account_type" `always "individual".`
- "plan" `the plan that is given to the vendor's users.`
- "paid_until" `the date the vendor account is paid until. It is given to the vendor's users as their "premium_expires_at".`
- "can_generate_vouchers" `whether the vendor account is allowed to generate vouchers.`

### Rate Limits

This endpoint is rate limited to **1 request per second** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Update Vendor Account

`PUT https://api.torbox.app/v1/api/vendors/updateaccount`

- Operation ID: `update_vendor_account`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Updates the name, the URL, or both, of your vendor account. Send at least one of `vendor_name` and `vendor_url`. The one that is not sent is left as it is.

The `vendor_url` follows the same rule as on the Register Vendor endpoint: it must start with `http://` or `https://` and be a domain with an optional path. A URL with a port, a query string or a fragment is rejected, and the request then changes nothing.

The response is the updated vendor account, in the same shape and with the same `detail` as the Get Vendor Account endpoint.

### Rate Limits

This endpoint is rate limited to **15 requests per hour** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Request body (`application/x-www-form-urlencoded`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vendor_name` | string | no | New name of the vendor. Optional, but at least one of vendor_name and vendor_url must be sent. |
| `vendor_url` | string | no | New website of the vendor. Must start with http:// or https:// and cannot contain a port, a query string or a fragment. Optional, but at least one of vendor_name and vendor_url must be sent. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Vendor Users

`GET https://api.torbox.app/v1/api/vendors/getaccounts`

- Operation ID: `get_vendor_users`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets every user account that is owned by your vendor account. Each item is the user's full account record, including their email, plan and `premium_expires_at`. There are no paging parameters, all of the users are returned in one response, ordered by their `id`. If the vendor account owns no users, `data` is an empty list.

The `auth_id` of a user is what the Get Vendor User and Remove Vendor User endpoints take as `user_auth_id`.

### Rate Limits

This endpoint is rate limited to **1 request per second** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Vendor User

`GET https://api.torbox.app/v1/api/vendors/getaccount`

- Operation ID: `get_vendor_user`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets a single user account that is owned by your vendor account, using the user's `auth_id`. A user that is not owned by your vendor account is not found.

The response is the user's full account record, the same as an item of the Get Vendor Users endpoint, with one more key at the end:

- "api_token" `the user's API token. If the user has no API token, this is the text "USER HAS NOT CONFIRMED EMAIL".`

### Rate Limits

This endpoint is rate limited to **1 request per second** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user_auth_id` | query | string | yes | Auth id of the user, from the Get Vendor Users endpoint. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Register Vendor User

`POST https://api.torbox.app/v1/api/vendors/registeruser`

- Operation ID: `register_vendor_user`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Registers a user under your vendor account. Your vendor account must be allowed to register users (`can_register_new`) and must be below its user limit (`current_users` lower than `users_allowed`). The email is trimmed and lowercased before it is used, and it must be a valid, deliverable address that is not from a disposable email provider.

What happens depends on whether the email already has a TorBox account:

- **New account** `the email has no TorBox account. A new TorBox account is created with its email already confirmed and a generated password. It is owned by your vendor account, on your vendor account's plan, with your vendor account's "paid_until" as its "premium_expires_at". The generated password is returned in the "password" key.`
- **Existing account** `the email already has a TorBox account that is not owned by a vendor. The account is attached to your vendor account, and its plan and "premium_expires_at" are replaced with your vendor account's plan and "paid_until". Its password is not changed, so the "password" key is the text "ALREADY_SET". The user receives a notification that they were added to your vendor account, with a link to your vendor URL.`

An existing account is attached only when the email you send is the account's own email, or is that email without its dots and without anything from a `+` on in the part before the `@`. Any other spelling of an existing account's email attaches nothing and is rejected with the error `USER_EXISTS`: the account of `jane.doe@example.com` is not attached by `jane.doe+shop@example.com`.

An account that is already owned by a vendor cannot be registered, and that includes an account your own vendor account already owns. When two vendors register the same account at the same moment, one of them gets it and the other is rejected.

Each successful registration raises your vendor account's `current_users` by one. The `auth_id` in the response is what the Get Vendor User and Remove Vendor User endpoints take as `user_auth_id`.

### Rate Limits

This endpoint is rate limited to **1 request per second** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Request body (`application/x-www-form-urlencoded`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `user_email` | string | yes | Email address of the user to register. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Remove Vendor User

`DELETE https://api.torbox.app/v1/api/vendors/removeuser`

- Operation ID: `remove_vendor_user`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Removes a user from your vendor account. The user must be owned by your vendor account. The user's TorBox account is not deleted, it is only released from the vendor, even though the `detail` of the response reads "User deleted successfully."

What happens to the user's plan depends on the plan they are on when they are removed:

- If the user is on the same plan as your vendor account, the user is moved to the free plan (plan 0) and their `premium_expires_at` is set to the current time.
- If the user is on a different plan than your vendor account, their plan and their `premium_expires_at` are left as they are.

Your vendor account's `current_users` is lowered by one, and the user receives a notification that they were removed from the vendor.

### Rate Limits

This endpoint is rate limited to **1 request per second** per API token.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user_auth_id` | query | string | yes | Auth id of the user to remove, from the Get Vendor Users endpoint. Required. |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Refresh Vendor Users

`PATCH https://api.torbox.app/v1/api/vendors/refresh`

- Operation ID: `refresh_vendor_users`
- Group: Vendors
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Refreshes every user that is owned by your vendor account. Each user's plan is set to your vendor account's `plan`, and each user's `premium_expires_at` is set to your vendor account's `paid_until`. Your vendor account's `current_users` is then recounted from the users it owns.

Your vendor account must be active: approved (its status is no longer "pending"), on a paid plan (its `plan` is not 0) and with a `paid_until` date that has not passed. Otherwise the request is rejected and no user is changed.

This endpoint takes no parameters and returns no data.

### Authorization

Requires an API key using the Authorization Bearer Header. Works with an API key from any plan, including the free plan.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Queued Downloads

`GET https://api.torbox.app/v1/api/queued/getqueued`

- Operation ID: `get_queued_downloads`
- Group: Queued
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Retrieves all of a user's queued downloads by type. If you want to get all 3 types, "torrent", "usenet" and "webdl" then you will need to run this request 3 times, each with the different type.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | integer | no | Determines the queued download requested, will return an object rather than list. Optional. |
| `type` | query | string | no | The type of the queued download you want to retrieve. Can be "torrent", "usenet" or "webdl". Optional. Default is "torrent". |
| `bypass_cache` | query | boolean | no | Allows you to bypass the cached data, and always get fresh information. Useful if constantly querying for fresh download stats. Otherwise, we request that you save our database a few calls. |
| `offset` | query | integer | no | Determines the offset of items to get from the database. Default is 0. Optional. |
| `limit` | query | integer | no | Determines the number of items to recieve per request. Default is 1000. Optional. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control Queued Downloads

`POST https://api.torbox.app/v1/api/queued/controlqueued`

- Operation ID: `control_queued_downloads`
- Group: Queued
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls a queued torrent. By sending the queued torrent's ID and the type of operation you want to perform, it will perform that action on the queued torrent.

Operations are either:

- **Delete** `deletes the queued download from your account`

- **Start** `starts a queued download, cannot be used with the "all" parameter`


### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `operation` | string | yes | the operation you want to perform on the torrent |
| `queued_id` | integer | no | the queued torrent's id, optional if using the "all" parameter |
| `all` | boolean | no | if you want to do this operation to all queued torrents in your account, optional if using the "queued_id" parameter |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get User Tags

`GET https://api.torbox.app/v1/api/tags/mytags`

- Operation ID: `get_tags`
- Group: Tags
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the tags attached to a user account, with the downloads using each tag, their count and total size.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Edit Tag

`PUT https://api.torbox.app/v1/api/tags/edittag`

- Operation ID: `edit_tag`
- Group: Tags
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Renames a tag. This new name is case sensitive. The ID is the tag's ID from the `/mytags`. Fails with `DUPLICATE_ITEM` when another of the user's tags already has the same name, in any casing.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes |  |
| `new_name` | string | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `409` Conflict
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Control Tag

`POST https://api.torbox.app/v1/api/tags/controltag`

- Operation ID: `control_tag`
- Group: Tags
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Controls a tag. Currently, the only operation is "delete", which deletes the tag and removes it from every download using it; the downloads stay in your account and are otherwise unmodified. The ID is the tag's ID from `/mytags` endpoint.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes |  |
| `operation` | string | yes |  |

## Responses

- `200` Successful Response
- `400` Bad Request
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Chat With Assistant

`POST https://api.torbox.app/v1/api/assistant/chat`

- Operation ID: `chat_with_assistant`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Send a message to the AI Assistant. Optionally include a `session_id` to resume a previous conversation. If no `session_id` is given, the AI will have no previous context and will create a new conversation.

Also included is a way to upload `files` in base64 allowing you to attach a file that the AI Assistant can use.

We also allow you to send `blocks` which is a list of strings that state what additional features your chat interface includes. If no `blocks` are sent, responses are sent in plain text and markdown (for things like tables or bolding text).

The answer is streamed as plain text while it is written. Send the header `Accept: text/event-stream` to get it as server-sent events instead: `tool` with the `name` of each tool the assistant uses, `text` with each piece of the answer, `support` with the `id` of the support conversation when the chat is handed to the support team, `usage` with the share of the day's allowance that is `used` and when it `resets_at`, `error` with the error if the answer fails, and `done` at the end.

```
event: tool
data: {"name": "get_torrent_list"}

event: text
data: {"text": "You have 2 torrents, "}

event: text
data: {"text": "and both have finished downloading."}

event: usage
data: {"used": 0.0123, "resets_at": "2026-01-01T00:00:00Z"}

event: done
data: {}
```

The `X-Session-ID` response header holds the `session_id` to send with the next message.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string | yes |  |
| `session_id` | string | no |  |
| `files` | object[] | no |  |
| `blocks` | string[] | no |  |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Assistant Usage

`GET https://api.torbox.app/v1/api/assistant/usage`

- Operation ID: `get_assistant_usage`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the current user's AI assistant usage. Users are limited to a certain number of tokens daily, and this endpoint tells you exactly how much is left as a percentage. This makes it easy for developers so they don't have to spend time counting tokens, which is usually inaccurate.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Assistant Conversations

`GET https://api.torbox.app/v1/api/assistant/conversations`

- Operation ID: `list_assistant_conversations`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Gets the user's open conversations. Conversations are sorted newest first. Each conversation is kept for 30 days after its last message.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Delete All Assistant Conversations

`DELETE https://api.torbox.app/v1/api/assistant/conversations`

- Operation ID: `delete_assistant_conversations`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Deletes all conversations for a user's account. Usage persists from the conversations.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Get Assistant Conversation

`GET https://api.torbox.app/v1/api/assistant/conversations/{session_id}`

- Operation ID: `read_assistant_conversation`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Get a specific user conversation with the AI assistant.

You can pass the `since` parameter with a Unix timestamp, and will show any revisions since that time, this way, you don't waste bandwidth retrieving and updating the entire conversation. If no update has been made since, the data return will be null.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `session_id` | path | string | yes | The session you want to retrieve. |
| `since` | query | integer | no | Unix timestamp of the conversation you want to get since this time. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable


---

## Delete Assistant Conversation

`DELETE https://api.torbox.app/v1/api/assistant/conversations/{session_id}`

- Operation ID: `delete_assistant_conversation`
- Group: Assistant
- Auth: API key, `Authorization: Bearer <api key>` (Sign in with TorBox gives the same key)

### Overview

Deletes a specific conversation with the AI assistant. Usage persists from the conversation.

### Authorization

Requires an API key using the Authorization Bearer Header.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `session_id` | path | string | yes | The session you want to retrieve. |

## Responses

- `200` Successful Response
- `401` Unauthorized
- `403` Forbidden
- `404` Not Found
- `422` Validation Error
- `429` Too Many Requests
- `500` Internal Server Error
- `503` Service Unavailable

