---
title: "Run an rclone command"
method: POST
path: "/core/command"
---

# Run an rclone command

`POST /core/command`

Executes a standard rclone CLI command remotely and streams or returns its output.

## Query parameters

- `command` string
- `arg` string[]
- `opt` string
- `returnType` string
- `_group` string
- `_async` boolean

## Headers

- `Prefer` 'respond-async'

## Request body

- CoreCommandRequest
  - `command` string — Name of the rclone command to execute, for example `ls` or `lsf`.
  - `arg` string[] — Optional positional arguments for the command. Repeat to supply multiple values.
  - `opt` string — Optional command options encoded as a JSON string.
  - `returnType` string — Controls how output is returned; accepts `COMBINED_OUTPUT`, `STREAM`, `STREAM_ONLY_STDOUT`, or `STREAM_ONLY_STDERR`.
  - `_group` string — Assign the request to a custom stats group.
  - `_async` boolean — Run the command asynchronously. Returns a job id immediately.

## Response `200`

Outcome of a command executed with `core/command`, including streamed result.

- object
  - `error` boolean, required
  - `result` string, nullable
  - `returnType` string, nullable

## Other responses

- `202` — Request accepted for async processing. Poll /job/status with the returned jobid.
- `4XX` — Any error response (HTTP 4xx/5xx)
- `5XX` — Any error response (HTTP 4xx/5xx)

---

[API](https://skmtc.net/rclone/apis/rclone-rc-api.md) · [All operations](https://skmtc.net/rclone/apis/rclone-rc-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rclone/rclone-rc-api/versions/2849bf2803ce/schema)
