---
title: "Drag the mouse along a path"
method: POST
path: "/browsers/{id}/computer/drag_mouse"
tags: ["Browser Computer Controls"]
---

# Drag the mouse along a path

`POST /browsers/{id}/computer/drag_mouse`

## Path parameters

- `id` string, required

## Request body

- DragMouseRequest
  - `path` array[], required — Ordered list of [x, y] coordinate pairs to move through while dragging. Must contain at least 2 points.
    - integer[]
  - `button` 'left' | 'middle' | 'right' — Mouse button to drag with
  - `delay` integer — Delay in milliseconds between button down and starting to move along the path.
  - `steps_per_segment` integer — Number of relative move steps per segment in the path. Minimum 1.
  - `step_delay_ms` integer — Delay in milliseconds between relative steps while dragging (not the initial delay).
  - `hold_keys` string[] — Modifier keys to hold during the drag
  - `smooth` boolean — Use human-like Bezier curves between path waypoints instead of linear interpolation. When true, steps_per_segment and step_delay_ms are ignored.
  - `duration_ms` integer — Target total duration in milliseconds for the entire drag movement when smooth=true. Omit for automatic timing based on total path length.

## Response `200`

Drag performed

## Other responses

- `400` — Bad Request – invalid input
- `404` — Resource not found
- `500` — Internal Server Error

---

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