> ## 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 mouse action (click, move, drag, double-click)

> Mouse action executed successfully

### Path parameters

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

### Request body

`MouseActionRequest`

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

<ParamField body="x" type="integer" required />

<ParamField body="y" type="integer" required />

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

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

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

### Response

`SuccessResponse`

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

### Status codes

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/mouse' \
    --header "Authorization: Bearer $STATESET_SANDBOX_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "action": "click",
    "x": 1,
    "y": 1,
    "button": 1,
    "endX": 1,
    "endY": 1
  }'
  ```
</RequestExample>

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