Skip to main content
POST
Swipe gesture on device

Authorizations

X-Api-Key
string
header
required

Workspace API key, created in the dashboard under Settings → API Keys.

Path Parameters

workspaceId
string<uuid>
required

Workspace UUID. Caller must have access.

deviceId
string
required

Device id (paired into the workspace).

Body

application/json
startX
number
required
startY
number
required
endX
number
required
endY
number
required
durationMs
integer
Required range: 1 <= x <= 60000
stealth
boolean

Follow a curved, eased path between the two points instead of a straight line at constant speed. The duration is unchanged. Returns 412 unsupported_stealth_input when the phone's agent cannot do it.

capture

capture: boolean | CaptureOptions. true captures with defaults; an object lets the caller override individual knobs. false or omitted = no capture.

Response

Swipe dispatched (capture optional)

ok
boolean
required
exit_code
integer
required

0 on success, non-zero on failure. Currently derived from ok; it does not carry the command's own exit code.

status
string
required
commandId
string
durationMs
integer | null
message
string
capture
object

Capture payload. All inner fields are optional and present iff the corresponding source was captured:

  • elements / element_count / screen_dimensions — set iff capture.ui was true.
  • screenshot_url — set iff capture.screenshot was true.

A screenshot-only capture (no UI) returns just screenshot_url; a UI-only capture returns the tree + count + dimensions; a full capture returns everything.

The action has already run when the capture is taken. On a single action endpoint, a failed capture still returns 200 with capture: { failed: true, error }, so a retry does not repeat a non-idempotent action. Inside a chain, a failed capture aborts the chain with an error instead (see POST …/chain).