Appcloud
Device API / API reference

Control a device

Send a command to one active cloud phone by its Appcloud device ID.

POST/api/v1/devices/{id}/actions

Request body

Send JSON with an action and its string value. Reboot takes only the action name and disconnects the live session.

ActionPurposeExample value
startAppStart an installed appcom.android.chrome
stopAppStop an installed appcom.android.chrome
restartAppRestart an installed appcom.android.chrome
inputTextType into the focused fieldHello from Appcloud
updateLanguageSet the Android languageen-US
updateTimeZoneSet the time zoneAmerica/New_York
restartReboot the phoneOmit
tapTap at screen coordinates120 240
swipeSwipe between two points over a duration in milliseconds100 500 100 100 350
longPressHold a point for a duration in milliseconds120 240 800
adbKeyPress an Android navigation or volume keyhome
uploadFileCopy a staged file to the phoneFILE_ID
installAppInstall a staged APKFILE_ID
uninstallAppRemove an installed packagecom.example.app
setKeepAliveAppKeep an Android service runningcom.example.app/com.example.app.SyncService
resetErase the device and restore its factory settingsERASE
disconnectEnd the streaming sessionOmit
clearAppsClose apps and return to the home screenOmit
Terminal
curl -X POST "$APPCLOUD_BASE/api/v1/devices/$DEVICE_ID/actions" -H "Authorization: Bearer $APPCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"startApp","value":"com.android.chrome"}'

Submission result

202 · JSON
{
  "deviceId": "phone_123",
  "action": "startApp",
  "status": "submitted"
}

submitted means the command was accepted for processing. already pending means an earlier task is still queued. Open the phone in My devices to verify the effect.