DOCS
Reference

API: Runs

Runs: Run a test, Run a project, List runs, Get a run, Wait for a run, Stop a run, Download a run file.

Run a test

POST/api/v1/tests/{testId}/run

Start a run of one test. Runs take minutes: poll get_run until final is true. watchUrl opens the run live without signing in. App tests run the newest build of their app unless buildId names another (see list_builds). watchUrl is a view-only link anyone can open (no sign-in) to watch the run live and read its result for a while after it ends; give it to the person waiting for the result. Absent when the workspace turned watch links off. REST: send an Idempotency-Key header so a retried request does not start a second run.

MCP tool: run_test. MCP OAuth: testsy:run or a higher scope. API keys: run or write access. Accepts an Idempotency-Key header.

Path
testIdstringrequired
Test id (t_…)
Body (JSON)
modeauto | cold | warm
auto (default) replays the learned path when it is fresh, else explores; cold always explores; warm only replays.
buildIdstring
Apps: run this build (ab_…)
devicephone | tablet
App tests: this run on a phone or tablet, whatever the test is set to (the test does not change; see list_devices)
osVersionstring
App tests: this run on this OS version, for example latest, iOS 26 or Android 14 (the test does not change; see list_devices)
orientationdefault | portrait | landscape
App tests: this run started in this orientation, default, portrait or landscape (the test does not change)
urlstring
Websites: start at this address instead of the test's saved one — a preview or staging deploy of the same site. The run then explores (cold).

Returns 201 { runId, mode, overage, link, watchUrl }

Request
curl -X POST https://app.testsy.dev/api/v1/tests/t_mvg0/run \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY" \
  -H "Idempotency-Key: deploy-4812"

Run a project

POST/api/v1/projects/{projectId}/run

Start a run of every test in a project (a suite). Each started run has a watchUrl to watch it live without signing in. buildIds: builds to use; each app test runs the one of its own app. Tests that could not start are listed in skipped with the reason. REST: send an Idempotency-Key header to make a retry safe.

MCP tool: run_project. MCP OAuth: testsy:run or a higher scope. API keys: run or write access. Accepts an Idempotency-Key header.

Path
projectIdstringrequired
Project id (p_…)
Body (JSON)
modeauto | cold | warm
auto (default) replays the learned path when it is fresh, else explores; cold always explores; warm only replays.
buildIdsstring[]
Build ids (ab_…), optional
buildIdstring
One build id (ab_…), optional
devicephone | tablet
App tests: this run on a phone or tablet, whatever the test is set to (the test does not change; see list_devices)
osVersionstring
App tests: this run on this OS version, for example latest, iOS 26 or Android 14 (the test does not change; see list_devices)
orientationdefault | portrait | landscape
App tests: this run started in this orientation, default, portrait or landscape (the test does not change)
urlstring
Websites: every website test starts at this address (a preview or staging deploy of the same site) and explores; app tests run their build as usual.

Returns 201 { started: [{ testId, runId, mode, buildId, link, watchUrl }], skipped: [{ testId, reason }], upgradeUrl? (when the plan stopped a run) }. Nothing started: 402 not_started (or 400 empty) with the same lists

Request
curl -X POST https://app.testsy.dev/api/v1/projects/p_8f2k/run \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY" \
  -H "Idempotency-Key: deploy-4812"

List runs

GET/api/v1/runs

Recent runs, newest first, optionally for one test or project or with one status; or the runs with the given ids.

MCP tool: list_runs. MCP OAuth: testsy:read or a higher scope. API keys: any active workspace key.

Query
idsstring
Comma-separated run ids (j_…, up to 50): returns their full views
testIdstring
Only this test
projectIdstring
Only this project
statusqueued | running | passed | failed | blocked | inconclusive | error | cancelled
Only this status
limitnumber
At most this many (default 50, up to 200)

Returns { runs: [{ id, testId, testTitle, status, mode, source, platform, createdAt, finishedAt, durationMs, … }] }; with ids, each run as in Get a run

Request
curl https://app.testsy.dev/api/v1/runs?ids=… \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY"

Get a run

GET/api/v1/runs/{runId}

A run: its status, and once final the verdict, the headline, each check's result with the reason, the values read, and links to the video, screenshots and the result page.

MCP tool: get_run. MCP OAuth: testsy:read or a higher scope. API keys: any active workspace key.

Path
runIdstringrequired
Run id (j_…)

Returns { run: { id, testId, testTitle, url, mode, status, final, createdAt, startedAt, finishedAt, durationMs, error, device, verdict, headline, requirements, captures, video, screenshots, build, link } }

Request
curl https://app.testsy.dev/api/v1/runs/j_mvg1 \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY"

Wait for a run

GET/api/v1/runs/{runId}/wait

Wait up to seconds (default 25, at most 55) for a run to finish, then return it: one call instead of polling get_run every few seconds. Call it again while final is false. The answer comes back the moment the run is final (verdict, checks and evidence in), or when the time is up with final false — then call wait_run again. Runs take 2 to 20 minutes, so expect several calls for a long run; each costs nothing while it waits.

MCP tool: wait_run. MCP OAuth: testsy:read or a higher scope. API keys: any active workspace key.

Path
runIdstringrequired
Run id (j_…)
Query
secondsnumber
How long to wait at most, 1–55 (default 25)

Returns { run (as in Get a run), final, waitedMs }: the run once it is final, or as it stands when the wait is over

Request
curl https://app.testsy.dev/api/v1/runs/j_mvg1/wait?seconds=… \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY"

Stop a run

POST/api/v1/runs/{runId}/stop

Stop a queued or running run. A run you stop is not counted.

MCP tool: stop_run. MCP OAuth: testsy:run or a higher scope. API keys: run or write access.

Path
runIdstringrequired
Run id (j_…)

Returns { status }

Request
curl -X POST https://app.testsy.dev/api/v1/runs/j_mvg1/stop \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY"

Download a run file

GET/api/v1/runs/{runId}/files/{file}

Download a run's video or screenshot (the links in get_run). Supports Range requests.

REST only. API keys: any active workspace key.

Path
runIdstringrequired
Run id (j_…)
filestringrequired
File path from get_run

Returns The file (video/mp4, image/png, …); 206 for a Range request

Request
curl https://app.testsy.dev/api/v1/runs/j_mvg1/files/review.mp4 \
  -H "Authorization: Bearer $TESTSY_AI_API_KEY"