Triggers – Cases

Trigger a case run

Starts a new test session for the specified test case. The case must have API access enabled in its settings.

Returns a sessionId — poll GET /api/triggers/cases/{caseId}/sessions/{sessionId} to track progress.

The session carries the case's tags, so GET /api/sessions?tag=… finds it. Tags can't be set per run here; to label a run, give the case the tags or run it in a plan with run tags.

post/api/triggers/cases/{caseId}/run

Request

Path parameters

caseIdstring uuid required

UUID of the test case to run.

Request body

model'default' | 'haiku' | 'sonnet' | 'kimi' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.5' | 'auto'

Model to use for this run. Call GET /api/models for the values your organization can run — anything else is rejected with 400, and the error carries the usable list in availableModels. When omitted, the defaultModel from that endpoint applies.

hostnameOverrideIdsstring[]

IDs of hostname overrides to apply for this run.

userDeviceIdstring uuid

Run on a registered local device (BYOD) from GET /api/devices/user; overrides the device bound on the case. A desktop case needs a desktop platform (windows, macos, linux); a mobile case needs a phone whose platform matches the case (platform in the body or the saved config), and cannot be combined with deviceArn. A mobile case bound to a local phone in apiMobileConfig runs on that phone when this field and deviceArn are both omitted; the run fails pre-flight, naming the phone, if it is no longer registered. Requires the BYOD feature to be enabled for your organization.

deviceArnstring

Encrypted device token from GET /api/devices (mobile only).

deviceNamestring

Override the device name (mobile only).

platform'ANDROID' | 'IOS'

Override the mobile platform.

uploadArnstring

Encrypted upload token from GET /api/uploads/{id} (mobile only).

uploadType'own_app' | 'existing' | 'sample'

Override the upload type (mobile only).

appNamestring

Override the app name (mobile only).

bundleIdstring

Override the app bundle id to launch (mobile only; a local phone needs one to launch an app). Must match apps[0].bundleId when both are given. Omitted, the case's saved bundle id applies unless the request installs an app of its own (uploadArn or apps).

runMode'agent' | 'replay'

replay replays the case's stored script when a usable version exists and runs the agent otherwise (mobile Device Farm runs only; requires the replay feature). Omitted means agent.

Response

Case run triggered.

successboolean required
sessionIdstring uuid required

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.