Skip to main content
POST
Start a test run: replay this workspace's test ca…

Authorizations

apiKey
string
query
required

apiKey MUST be supplied within the request body instead of query

Path Parameters

projectId
string<uuid>
required

POST /v2/api/projects/:projectId/workspaces/:workspaceId/test-runs Parameter

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
workspaceId
string<uuid>
required

POST /v2/api/projects/:projectId/workspaces/:workspaceId/test-runs Parameter

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Body

application/json

POST /v2/api/projects/:projectId/workspaces/:workspaceId/test-runs Request body

apiKey
string

Upsolve API key, generated under Account → Developer settings in the Upsolve Hub. Keys are user-scoped: pass organizationId alongside the key to select which org to act on.

Minimum string length: 1
Example:

"up_embed_************"

organizationId
string<uuid>

Your Upsolve organization's UUID — the org that owns the API key and project. This is NOT a project organization: do not pass a value registered via /projects/register-organization, and do not pass an externalId (only projectOrganizationId accepts those). Omit it when using an org-bound API key — the org is read from the key and any value sent here is ignored. Required only for user-scoped API keys (created under Account → Developer settings) and for the Supabase JWT path, where the org is ambiguous and membership is verified against it.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example:

"123e4567-e89b-12d3-a456-426614174000"

version
default:draft

Which version to test: 'draft' (the default) for the unpublished working copy, or a published version number. A run on a published version never satisfies the publish gate.

Allowed value: "draft"
caseIds
string[]

Run only these test cases. Omit to run them all. A narrowed run never satisfies the publish gate.

projectUserId
string<uuid>

Answer as this project user instead of yourself: their row-level security applies, and their environment decides which database the cases run against. Omit to run as your own project user (production).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
environment
string

The environment this run must read. Refused (409 TEST_USER_WRONG_ENVIRONMENT) when the project user it answers as is in another environment; without projectUserId you answer as yourself, in production. Omit to run in whichever environment that user is in.

Response

POST /v2/api/projects/:projectId/workspaces/:workspaceId/test-runs Positive response

status
string
required
Allowed value: "success"
data
object
required