---
title: "Run test"
method: POST
path: "/v2/tests/{testId}/runs"
tags: ["Tests"]
---

# Run test

`POST /v2/tests/{testId}/runs`

## Request

- Base URL: `https://app.aiva.works` (the document declares no server; this is the origin it was published from)
- URL: `https://app.aiva.works/v2/tests/{testId}/runs`
- Auth: API key in header `X-API-KEY`

Enqueues a run of the test and returns the test run ID. Poll GET /v2/test-runs/{testRunId} for the result.

## Path parameters

- `testId` string, guid, required

## Response `202`

Test run enqueued

- RunTestResponse
  - `testRunId` string, guid: GUID of the test run; use this to query the result of the test

## Other responses

- `400`: Test or gateway not found, or invalid input
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Queue limit exceeded -- retry later
- `500`: Server Error

---

[API](https://skmtc.dev/aiva/apis/aiva-cloud-api.md) · [All operations](https://skmtc.dev/aiva/apis/aiva-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aiva/apis/aiva-cloud-api/revisions/70eef14d3bcd?raw)
