autobrr External Programs API

Manage and execute external applications

Operations 5

GET /api/external-programs List external programs #
POST /api/external-programs Create external program #
PUT /api/external-programs/{id} Update external program #
DELETE /api/external-programs/{id} Delete external program #
POST /api/external-programs/execute Execute external program #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/autobrr:autobrr-external-programs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

autobrr-external-programs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: qui External Programs API
  description: 'qui API for managing multiple qBittorrent instances.

    If allowedHosts is configured, a missing, invalid, or unlisted received Host

    returns HTTP 400 before authentication or routing. X-Forwarded-Host is ignored.

    Request ports do not affect matching. Only direct loopback GET and HEAD

    requests to /health, /healthz/readiness, and /healthz/liveness bypass the list.


    For automation create and update requests, set `conditions.category.enabled` to `true`

    and `conditions.category.category` to an empty string to remove the torrent category.

    Set `conditions.category.enabled` to `false` to disable the category action.'
  version: 1.0.0
  license:
    name: GPL-2.0-or-later
    url: https://opensource.org/licenses/GPL-2.0
servers:
- url: http://localhost:7476
  description: Local development server
- url: /
  description: Current server
security:
- ApiKeyAuth: []
- SessionAuth: []
tags:
- name: External Programs
  description: Manage and execute external applications
paths:
  /api/external-programs:
    get:
      tags:
      - External Programs
      summary: List external programs
      description: Get all configured external programs
      responses:
        '200':
          description: List of external programs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExternalProgram'
      operationId: getApiExternalPrograms
      x-operation-id-source: derived
    post:
      tags:
      - External Programs
      summary: Create external program
      description: Add a new external program configuration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - path
              properties:
                name:
                  type: string
                  description: Display name for the external program
                path:
                  type: string
                  description: Path to the executable
                args_template:
                  type: string
                  description: Arguments template with variable substitution ({hash}, {name}, {save_path}, {content_path}, {category}, {tags}, {state}, {size}, {progress})
                enabled:
                  type: boolean
                  default: true
                  description: Whether this program is enabled
                use_terminal:
                  type: boolean
                  default: true
                  description: Whether to launch in a terminal window
                path_mappings:
                  type: array
                  items:
                    $ref: '#/components/schemas/PathMapping'
                  default: []
                  description: Path mappings to convert remote paths to local paths (useful for remote instances)
      responses:
        '201':
          description: External program created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalProgram'
        '409':
          description: A program with this name already exists
      operationId: postApiExternalPrograms
      x-operation-id-source: derived
  /api/external-programs/{id}:
    put:
      tags:
      - External Programs
      summary: Update external program
      description: Update an external program configuration
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - path
              properties:
                name:
                  type: string
                  description: Display name for the external program
                path:
                  type: string
                  description: Path to the executable
                args_template:
                  type: string
                  description: Arguments template with variable substitution
                enabled:
                  type: boolean
                  description: Whether this program is enabled
                use_terminal:
                  type: boolean
                  description: Whether to launch in a terminal window
                path_mappings:
                  type: array
                  items:
                    $ref: '#/components/schemas/PathMapping'
                  description: Path mappings to convert remote paths to local paths
      responses:
        '200':
          description: External program updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalProgram'
        '404':
          description: External program not found
        '409':
          description: A program with this name already exists
      operationId: putApiExternalProgramsById
      x-operation-id-source: derived
    delete:
      tags:
      - External Programs
      summary: Delete external program
      description: Delete an external program configuration
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: External program deleted successfully
        '404':
          description: External program not found
      operationId: deleteApiExternalProgramsById
      x-operation-id-source: derived
  /api/external-programs/execute:
    post:
      tags:
      - External Programs
      summary: Execute external program
      description: 'Execute an external program for one or more torrents.


        The program runs asynchronously, and this endpoint returns immediately after qui queues it.

        qui runs a limited number of programs at the same time, so the program can start up to 30 minutes later, or not start at all.

        The activity log records the result.

        The ''success'' field in the response indicates whether qui queued the program, not whether it started or completed successfully.


        The program path and arguments are passed through variable substitution where placeholders

        like {hash}, {name}, {save_path}, etc. are replaced with actual torrent metadata.


        Security: On Windows, all arguments are escaped for cmd.exe using ^ before being passed

        to CreateProcess to prevent command injection via malicious torrent names.

        On Unix/Linux, arguments are wrapped in single quotes with proper escaping.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - program_id
              - instance_id
              - hashes
              properties:
                program_id:
                  type: integer
                  description: ID of the external program to execute
                  example: 1
                instance_id:
                  type: integer
                  description: ID of the qBittorrent instance where the torrents are located
                  example: 1
                hashes:
                  type: array
                  items:
                    type: string
                  description: Array of torrent hashes to execute the program for
                  example:
                  - abc123def456
                  - 789ghi012jkl
      responses:
        '200':
          description: Execution results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        hash:
                          type: string
                        success:
                          type: boolean
                        message:
                          type: string
                        error:
                          type: string
        '400':
          description: Invalid request (missing program_id, instance_id, or hashes; or program is disabled)
        '404':
          description: Program not found
        '500':
          description: Internal server error (failed to get client for instance, failed to retrieve torrent info)
      operationId: postApiExternalProgramsExecute
      x-operation-id-source: derived
components:
  schemas:
    PathMapping:
      type: object
      description: Maps remote paths to local paths for external program execution
      properties:
        from:
          type: string
          description: Remote path prefix to match (e.g., "/mnt/remote-storage/downloads")
          example: /mnt/remote-storage/downloads
        to:
          type: string
          description: Local path prefix to replace with (e.g., "/home/user/downloads")
          example: /home/user/downloads
    ExternalProgram:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          description: Display name for the external program
        path:
          type: string
          description: Path to the executable
        args_template:
          type: string
          description: Arguments template with variable substitution
        enabled:
          type: boolean
          description: Whether this program is enabled
        use_terminal:
          type: boolean
          description: Whether to launch in a terminal window
        path_mappings:
          type: array
          items:
            $ref: '#/components/schemas/PathMapping'
          description: Path mappings to convert remote paths to local paths for remote instances
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication
    ApiKeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: API key via query parameter for external webhook integrations
    SessionAuth:
      type: apiKey
      in: cookie
      name: qui_user_session
      description: 'Browser session cookie set by the qui web UI. POST, PUT, PATCH, and DELETE

        requests authenticated by this cookie must also send an `X-Requested-With`

        header. Other clients should use an API key.

        '