v48

latestOpenAPI 3.0.0raw.githubusercontent.com2025-12-0297180624.8 KB
UI Action

Touch

Performs more advanced touch gestures. Use this endpoint to simulate realistic behaviors.

post/boxes/{boxId}/actions/touch

Path parameters

boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d

Box ID

Request body

outputFormat'base64' | 'storageKey'

⚠️ DEPRECATED: Use options.screenshot.outputFormat instead. Type of the URI. default is base64. This field will be ignored when options.screenshot is provided.

presignedExpiresInstring

⚠️ DEPRECATED: Use options.screenshot.presignedExpiresIn instead. Presigned url expires in. Only takes effect when outputFormat is storageKey. This field will be ignored when options.screenshot is provided.

Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 30m

screenshotDelaystring

⚠️ DEPRECATED: Use options.screenshot.delay instead. This field will be ignored when options.screenshot is provided.

Delay after performing the action, before taking the final screenshot.

Execution flow:

  1. Take screenshot before action
  2. Perform the action
  3. Wait for screenshotDelay (this parameter)
  4. Take screenshot after action

Example: '500ms' means wait 500ms after the action before capturing the final screenshot.

Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 500ms Maximum allowed: 30s

includeScreenshotboolean

⚠️ DEPRECATED: Use options.screenshot.phases instead. This field will be ignored when options.screenshot is provided. Whether to include screenshots in the action response. If false, the screenshot object will still be returned but with empty URIs. Default is false.

Example request

{
  "points": [
    {
      "start": {
        "x": 100,
        "y": 150
      },
      "actions": [
        {
          "x": 400,
          "y": 300,
          "duration": "200ms"
        },
        {
          "duration": "500ms"
        }
      ]
    }
  ],
  "options": {
    "screenshot": {
      "outputFormat": "base64",
      "presignedExpiresIn": "30m",
      "delay": "500ms",
      "phases": [
        "before",
        "after"
      ]
    }
  },
  "outputFormat": "base64",
  "presignedExpiresIn": "30m",
  "screenshotDelay": "500ms"
}

Response

Touch action result with actual parameters used

messagestring required

message

actionIdstring required

Unique identifier for each action. Use this ID to locate the action and report issues.

Example response

{
  "message": "Action executed successfully",
  "actionId": "c9bdc193-b54b-4ddb-a035-5ac0c598d32d",
  "screenshot": {
    "trace": {
      "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..."
    },
    "before": {
      "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...",
      "presignedUrl": "https://example.com/xxxxx/xxxxx/xxxxx"
    },
    "after": {
      "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...",
      "presignedUrl": "https://example.com/xxxxx/xxxxx/xxxxx"
    }
  },
  "actual": {
    "points": [
      {
        "start": {
          "x": 100,
          "y": 150
        },
        "actions": [
          {
            "type": "move",
            "x": 400,
            "y": 300,
            "duration": "200ms"
          },
          {
            "type": "wait",
            "duration": "500ms"
          }
        ]
      }
    ]
  }
}