> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Perform a keyboard action (type, key, hotkey)

> Keyboard action executed successfully

### Path parameters

<ParamField path="id" type="string (uuid)" required>
  Sandbox identifier
</ParamField>

### Request body

`KeyboardActionRequest`

<ParamField body="action" type="string" required />

<ParamField body="text" type="string" />

<ParamField body="key" type="string" />

<ParamField body="keys" type="string[]" />

<ParamField body="modifiers" type="string[]" />

<ParamField body="delayMs" type="integer" />

### Response

`SuccessResponse`

<ResponseField name="success" type="boolean" />

### Status codes

| Code  | Meaning                               |
| ----- | ------------------------------------- |
| `200` | Keyboard action executed successfully |
| `400` | Invalid request                       |
| `404` | Sandbox not found                     |
| `500` | Keyboard action failed                |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/keyboard' \
    --header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "action": "type",
    "text": "Two-person tent, green — replacement for damaged pole set.",
    "key": "string",
    "keys": [
      "string"
    ],
    "modifiers": [
      "string"
    ],
    "delayMs": 0
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```
</ResponseExample>
