Start Run API
The Start Run API allows you to programmatically trigger test runs for your projects. This endpoint is particularly useful for integrating QA.tech testing into your CI/CD pipelines and custom automation workflows. The Start Run API provides a single endpoint to create new test runs:- Endpoint:
POST /projects/{projectId}/runs
- Authentication: Bearer token (JWT)
- Content-Type:
application/json
Authentication
The Start Run API uses Bearer token authentication. Include your project’s API token in theAuthorization
header:
Request Parameters
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
projectId | string | Yes | The unique identifier of your QA.tech project |
Headers
Header | Value | Required | Description |
---|---|---|---|
Content-Type | application/json | Yes | Media type of the request body |
Request Body
The request body is optional and can contain the following fields:Optional Fields
integrationName
(string): Human-readable name of what triggered this test (defaults to “API”)testPlanShortId
(string): The short ID of the test plan to executeapplications
(object): Optional application environment overrides for testing specific environments. Each application can specify either a new environment (withurl
andname
) or reference an existing environment (withshort_id
).
Example Requests
Basic Test Run
Test Run with Preview Environment
Response Format
Success Response (200)
Error Responses
Bad Request (400)
Returned when the request body is malformed or missing required fields.Unauthorized (401)
Returned when the bearer token is invalid or expired.Payment Required (402)
Returned when the organization has reached its usage limit.Forbidden (403)
Returned when the organization is suspended or access is denied.Not Found (404)
Returned when the specified project ID doesn’t exist.Internal Server Error (500)
Returned when there’s an internal server error.Use Cases
CI/CD Integration
Integrate test runs into your deployment pipeline to automatically test changes before they reach production.Preview Environment Testing
Test pull request changes in isolated environments before merging.Scheduled Testing
Set up recurring test runs to ensure ongoing quality assurance.Custom Workflows
Trigger tests based on custom business logic or external events.Integration Examples
GitHub Actions
For a complete guide to GitHub Actions integration including the official QA.tech action and additional examples, see GitHub Actions.