---
title: "Trigger a discovery run"
method: POST
path: "/v1/projects/{projectId}/discovery-runs"
tags: ["projects"]
---

# Trigger a discovery run

`POST /v1/projects/{projectId}/discovery-runs`

Queue a free-roam discovery run: the QA agent gets only a goal, decides what to test itself, and reports every bug it finds. Supports web, iOS, and Android; mobile platforms explore the uploaded app. FAILED means bugs were found.

## Path parameters

- `projectId` string, required

## Headers

- `Authorization` string, required

## Request body

- DiscoveryRunRequest
  - `goal` string, required — The exploration goal for the free-roam QA agent, e.g. "Explore the checkout flow and find bugs". The agent decides what to test; there is no predefined step list.
  - `targetUrl` string, uri — Optional URL to explore instead of the project's production URL. Web only.
  - `platform` 'web' | 'ios' | 'android' — Target platform; defaults to web. Mobile platforms explore the uploaded app.
  - `appId` string — Uploaded mobile app ID to explore. Defaults to the project's latest app for the platform.
  - `deviceModel` 'iphone' | 'ipad' — Mobile device variant within the platform (e.g. ipad on iOS). Omit for the default phone-sized device.

## Response `202`

Discovery run queued successfully

- DiscoveryRunResponse
  - `status` 'queued', required
  - `runId` string, uuid, required
  - `projectId` string, uuid, required
  - `platform` 'web' | 'ios' | 'android', required

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Project not found
- `413` — Request body too large
- `429` — Too Many Requests - Usage limit exceeded
- `500` — Internal Server Error
- `504` — Gateway Timeout - Test execution exceeded time limit

---

[API](https://skmtc.net/tester/apis/testerarmy-api.md) · [All operations](https://skmtc.net/tester/apis/testerarmy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tester/testerarmy-api/revisions/008f119d866c/schema)
