---
title: "Drag mouse (native)"
method: POST
path: "/v1/computer/{machine_id}/input/mouse/drag"
tags: ["computer"]
---

# Drag mouse (native)

`POST /v1/computer/{machine_id}/input/mouse/drag`

## Request

- Base URL: `https://api.cyberdesk.io`
- URL: `https://api.cyberdesk.io/v1/computer/{machine_id}/input/mouse/drag`
- Auth: HTTP bearer

Perform a drag operation using absolute coordinates with required start and optional duration.

## Path parameters

- `machine_id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- MouseDragRequest
  - `to_x` integer, required
  - `to_y` integer, required
  - `start_x` integer, required
  - `start_y` integer, required
  - `duration` number, nullable
  - `button` string, nullable: 'left' | 'right' | 'middle'

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud.md) - [All operations](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/cyberdesk-hq/apis/cyberdesk-cloud/revisions/5579352ae05e?raw)
