> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qa.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# API regression testing

> Run a test plan from any system that can send an HTTP request, including a CI QA.tech has no plugin for.

Start from a [test plan](/core-concepts/test-plans). Use the API when you do not run GitHub Actions, GitLab CI, Bitrise, or Envoyer. Bitbucket, Azure DevOps, CircleCI, Jenkins, and a script on a server all work.

## Set it up

<CardGroup cols={2}>
  <Card title="Create a test plan" icon="clipboard-list" href="/core-concepts/test-plans">
    Pick the tests, then copy the plan short ID (`pln_…`).
  </Card>

  <Card title="Start Run API" icon="code" href="/api-reference/runs/start-test-run">
    `POST /v1/run` with `testPlanShortId`, plus URL or device overrides.
  </Card>

  <Card title="Wait for the result" icon="hourglass-half" href="/api-reference/runs/get-run">
    Poll the run and fail the job when the result is not passed.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli/commands/run">
    `qatech run` calls the same API. `qatech status` waits for the result.
  </Card>
</CardGroup>

API key setup and the short IDs are on [Other CI (API)](/configuration/ci-cd-integration).

## What works over the API

| Capability                                 | API                                                                                                                      |
| :----------------------------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| Review on a preview URL, before merge      | Not this endpoint. A test plan run does not post a review. See the [pull request API](/pr-testing/api).                  |
| Review after merge, with no preview URL    | Not this endpoint.                                                                                                       |
| Run a regression test plan from CI         | Yes. `POST /v1/run` with `testPlanShortId`. You can override the URL or device for that run.                             |
| Run that plan against a mobile build       | Yes. Upload the build, then pass `applicationBuildShortId`. See [Application builds](/api-reference/application-builds). |
| Block the pipeline until the plan finishes | Yes. Poll [Get run](/api-reference/runs/get-run) and fail the job when the result is not passed.                         |
| Schedule                                   | On the test plan, with **Manage Schedules**. The API does not store a cron.                                              |

## What you can override on a run

* **Preview or staging URL**: set `applications[].environment.url`. See [Preview Environments](/core-concepts/applications-and-environments#preview-environments).
* **Environment custom headers**: attach auth or protection-bypass headers with `customHeaders`. See [Environment custom headers](/core-concepts/applications-and-environments#custom-headers).
* **Device preset**: pass `devicePresetShortId` to test mobile, tablet, or desktop without another test plan. See [Start Run API](/api-reference/runs/start-test-run).
* **Slack channel**: send results for one run to a different channel. See [Per-run overrides](/core-concepts/notifications#per-run-overrides).
* **Post-run automation**: poll [Get run](/api-reference/runs/get-run) to update a status page, call a webhook, or send an alert when the run finishes.

## What this does not do

* It does not post a pull request review. Use [API pull request testing](/pr-testing/api) for that.
* It does not require GitHub, GitLab, Bitrise, or Envoyer. Those guides are convenience wrappers around this call.
* It does not schedule itself. **Manage Schedules** on the test plan runs it with no CI at all. See [Manual and scheduled runs](/best-practices/running-tests).
