Skip to main content
POST

Authorizations

Authorization
string
header
required

Send Authorization: Bearer tst_live_….

Format (services/api-keys.ts): the literal prefix tst_live_ followed by 24 random bytes rendered as 32 base64url characters. Only the SHA-256 hash is stored server-side. The shape check that routes a token down the API-key path rather than the Clerk JWT path requires the tst_live_ prefix and a total length of at least 25 characters.

Keys are minted in the dashboard at /settings/team. The same header also accepts a Clerk session JWT, which is how the web app authenticates, but the JWT path is out of scope for this document.

Body

application/json

Body of POST /api/runs/trigger, mirroring TriggerRunBody in routes/runs.ts. Exactly one of procedureId or description is required. The schema rejects both neither and both.

projectId
string<uuid>
required

The project to run against. Always required, even in replay mode. Must be a live project in the key's organization.

procedureId
string<uuid>

Replay mode. A saved procedure belonging to projectId; its stored steps are executed with no LLM planning call. Mutually exclusive with description.

description
string

Ad-hoc mode. A plain-English description of the test; Claude plans the steps. Mutually exclusive with procedureId. Note the first 2000 characters are what get stored as the run's instruction.

Required string length: 1 - 4000
expectation
enum<string>
default:pass

How to frame the verdict.

  • pass (default): a positive test; every step should succeed.
  • fail: a negative test; the run "passes" when the application correctly refuses the action. A safety net in the orchestrator appends a synthetic failed step if nothing actually failed.
  • unknown: exploratory; no strong framing.

The server coerces anything other than fail/unknown to pass.

Available options:
pass,
fail,
unknown
baseUrl
string

Override the project's base URL for this run only. The usual way to point CI at a PR preview deployment. Beaten by the environment's base URL when environmentId is also set. Validated only for length here; the SSRF guard checks the resolved URL and rejects private hosts with 400.

Maximum string length: 2048
environmentId
string<uuid>

Apply a saved project environment (base URL, extra headers, cookies). Its base URL takes priority over baseUrl and over the project default. An environment id that does not resolve for this project is silently ignored rather than erroring.

maxDurationMinutes
integer

Per-run time cap. Omit to inherit the procedure's saved value, then the platform default of 10 minutes.

Required range: 5 <= x <= 120

Response

Accepted. The run row exists in pending and execution has started in the background.

runId
string<uuid>
required

The pre-allocated run id. Poll it to observe completion.

projectId
string<uuid>
required
status
string
required

Always the literal string pending. This is the state the row was created in, not a live read.

Allowed value: "pending"
pollUrl
string
required

Relative path to poll, e.g. /api/runs/<runId>. Join it to the server base URL.

Example:

"/api/runs/4c9e1f77-2a31-4e0b-8d6a-1f2b3c4d5e6f"