---
title: "One action on the phone (no waiting)"
method: POST
path: "/devices/{name}/action"
tags: ["Screen and input"]
---

# One action on the phone (no waiting)

`POST /devices/{name}/action`

## Request

- Base URL: `https://api.clousd.com/v1`
- URL: `https://api.clousd.com/v1/devices/{name}/action`
- Auth: HTTP bearer

## Request body

- Action
  - `op` 'tap' | 'long_press' | 'swipe' | 'scroll' | 'text' | 'key' | 'open_app' | 'close_app' | 'url' | 'intent' | 'settings' | 'screen_text' | 'find_text' | 'tap_text' | 'wait_text' | 'installed' | 'clipboard_get' | 'clipboard_set' | 'notifications' | 'notifications_open' | 'notifications_close' | 'notifications_clear' | 'app_info' | 'crashes' | 'health', required: Read-only ops (installed, screen_text, find_text, wait_text, clipboard_get, notifications, app_info, crashes, health) do not change the observation seq. clipboard_get, notifications, app_info, crashes and health return their result as JSON in `data`.
  - `x` integer: phone pixels
  - `y` integer
  - `x2` integer
  - `y2` integer
  - `ms` integer: swipe duration; for wait_text the timeout in ms (max 120000)
  - `text` string: text to type (any language), text to find, scroll direction (down|up)
  - `key` string: home, back, recents, enter, power, tab, del, menu, volume_up, volume_down, wake, sleep or a keycode
  - `package` string
  - `url` string
  - `fx` number: x as a fraction of the screen width (0..1) instead of pixels (tap, swipe, long_press)
  - `fy` number
  - `intent` object: for op=intent - started like `am start` from the shell user
    - `action` string
    - `data` string: a URI, e.g. https://example.com or geo:0,0?q=coffee
    - `package` string
    - `component` string
    - `type` string: MIME type
    - `extras` object: string extras

## Response `200`

OK

- object
  - `ok` boolean
  - `output` string
  - `texts` string[]
  - `packages` string[]

## Other responses

- `400`: Error

---

[API](https://skmtc.dev/clousd/apis/clousd-api.md) · [All operations](https://skmtc.dev/clousd/apis/clousd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clousd/apis/clousd-api/revisions/0291ffd26ae3?raw)
