---
title: "Send Real-time Control Command"
method: POST
path: "/openapi/v2.0/device/{device_sn}/command"
tags: ["Real-time Control/Flight Control Commands/General Real-time Commands"]
---

# Send Real-time Control Command

`POST /openapi/v2.0/device/{device_sn}/command`

## Request

- Base URL: `` (relative, and it does not resolve against the document’s source URL)
- URL: `/openapi/v2.0/device/{device_sn}/command`
- Auth: none required

During wayline flight or manual flight, you can call this command for real-time control of the aircraft, such as return-to-home, cancel return-to-home, flight task pause and resume operations

## Path parameters

- `device_sn` string, required

## Headers

- `X-User-Token` string, required
- `X-Project-Uuid` string, required
- `X-Request-Id` string
- `X-Language` string

## Request body

- object
  - `device_command` 'return_home' | 'return_home_cancel' | 'flighttask_pause' | 'flighttask_recovery', required: Command Type

## Response `200`

Operation Successful

- object
  - `code` integer: Business status code, 0 means success
  - `message` string: Business Message
  - `data` object: Command dispatch result. This interface returns the synchronous receipt of command acceptance and only indicates whether dispatch succeeded; the actual command execution result is reported asynchronously via DRC/MQTT

## Other responses

- `401`: Login expired, please log in again
- `403`: Account does not have permission to access this resource
- `404`: Resource Not Found
- `500`: Internal Service Error

---

[API](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud.md) - [All operations](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/dji/apis/flighthub-2-openapi-v2-0-public-cloud/revisions/aeef0010be34?raw)
