Skip to main content
POST
Tap 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

Provide index, or x+y, or both. At least one form is required: supplying neither is a 400, and x without y is a 400 only when no index is supplied. When both forms are supplied index wins and the coordinates are ignored.

index
integer
required

1-based interactive element index from /state.a11yTree.

Required range: x >= 1
x
number

Pixel x-coordinate (alternative to index).

y
number

Pixel y-coordinate (alternative to index).

stealth
boolean

Inject this tap the way a person would: the press held 45–110 ms instead of a single frame, and the point nudged by up to 2 px. Returns 412 unsupported_stealth_input when the phone's agent cannot do it; it is never silently downgraded.

capture

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

Response

Tap 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
resolved
object
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).