# press_button

Press a hardware button (home, lock, volumeUp, volumeDown, siri, action, back, recents, power). To change apps, use launch_app with the app's name; never press home.

Press a hardware button (home, lock, volumeUp, volumeDown, siri, action, back, recents, power). To change apps, use launch_app with the app's name; never press home.

| | |
|---|---|
| REST operation | [`act`](/reference/rest/actions/#act) (`POST /v1/devices/{deviceId}/actions`) |
| Action type | `pressButton` |
| Needs a device | yes |
| Read only | no |
| Profiles | `core`, `testing`, `full` |

## Parameters

| Name | Required | Type | Goes to | What it is |
|---|---|---|---|---|
| `device_id` | yes | string | path `deviceId` | Stable device id such as `ios:00008120-001A2B3C4D5E6F70` or `android:R58M123ABC`. |
| `lease` | no | string | header `Silan-Lease` | Lease token when the device is claimed. |
| `button` | yes | `home`, `lock`, `volumeUp`, `volumeDown`, `siri`, `action`, `back`, `recents`, `power` | body `action.button` |  |
| `duration_ms` | no | integer | body `action.durationMs` |  |
| `return` | no | object | body `returning` |  |

## Example call

```text
press_button({ device_id: "ios:00008120-001A2B3C4D5E6F70", button: … })
```