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

# Click mouse

> Perform a left, right, or double click at given screen coordinates.

Performs a mouse click at the specified coordinates.

## Path parameters

<ParamField path="id" type="string" required>
  Computer ID (UUID).
</ParamField>

## Body parameters

<ParamField body="x" type="integer" required>
  X coordinate (pixels from left edge).
</ParamField>

<ParamField body="y" type="integer" required>
  Y coordinate (pixels from top edge).
</ParamField>

<ParamField body="button" type="string" default="left">
  Mouse button: `left` or `right`.
</ParamField>

<ParamField body="double" type="boolean" default="false">
  If `true`, performs a double-click. When `double` is set, `button` is ignored.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` if the click was performed.
</ResponseField>

<ResponseField name="action" type="string">
  Action name: `click` or `double_click`.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  # Left click at (100, 200)
  curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/click \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"x": 100, "y": 200}'

  # Right click
  curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/click \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"x": 100, "y": 200, "button": "right"}'

  # Double click
  curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/click \
    -H "Authorization: Bearer $ORGO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"x": 100, "y": 200, "double": true}'
  ```

  ```python Python theme={null}
  import requests

  # Left click
  requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/click",
      headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
      json={"x": 100, "y": 200}
  )

  # Right click
  requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/click",
      headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
      json={"x": 100, "y": 200, "button": "right"}
  )

  # Double click
  requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/click",
      headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
      json={"x": 100, "y": 200, "double": True}
  )
  ```

  ```javascript JavaScript theme={null}
  // Left click
  await fetch(`https://www.orgo.ai/api/computers/${computerId}/click`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ x: 100, y: 200 })
  });

  // Right click
  await fetch(`https://www.orgo.ai/api/computers/${computerId}/click`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ x: 100, y: 200, button: 'right' })
  });
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "success": true,
  "action": "click",
  "details": { "x": 100, "y": 200, "button": "left", "double": false }
}
```

## Errors

| Status | Meaning                                        |
| ------ | ---------------------------------------------- |
| `400`  | Computer instance not available (not running). |
| `401`  | Missing or invalid API key.                    |
| `403`  | You do not have access to this computer.       |
| `404`  | Computer not found.                            |
| `500`  | Upstream desktop agent failure.                |


## OpenAPI

````yaml POST /computers/{id}/click
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Streaming
    description: Stream computer display via RTMP
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
paths:
  /computers/{id}/click:
    post:
      tags:
        - Computer Actions
      summary: Click mouse
      description: Performs a mouse click at the specified coordinates.
      operationId: mouseClick
      parameters:
        - name: id
          in: path
          required: true
          description: Computer ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClickRequest'
            examples:
              left-click:
                summary: Left click
                value:
                  x: 100
                  'y': 200
              right-click:
                summary: Right click
                value:
                  x: 100
                  'y': 200
                  button: right
              double-click:
                summary: Double click
                value:
                  x: 100
                  'y': 200
                  double: true
      responses:
        '200':
          description: Click performed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ClickRequest:
      type: object
      required:
        - x
        - 'y'
      properties:
        x:
          type: integer
          description: X coordinate
          minimum: 0
        'y':
          type: integer
          description: Y coordinate
          minimum: 0
        button:
          type: string
          enum:
            - left
            - right
          default: left
          description: Mouse button
        double:
          type: boolean
          default: false
          description: Double-click
    ActionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````