> ## 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.

# Application Builds API

> Upload and manage mobile app builds for testing

The Application Builds API enables you to upload mobile app builds for testing with QA.tech. Use these endpoints to integrate mobile app build uploads into your CI/CD pipelines and automation workflows.

## When to Use This API

* **CI/CD integration** – Automatically upload builds after successful compilation
* **Mobile app testing** – Upload iOS and Android builds for automated testing
* **Version management** – Track and test different build versions

> [!NOTE]
>
> This API is for **mobile applications** (iOS and Android) only. For web
> applications, use environment URLs directly in the [Start Run
> API](https://docs.qa.tech/api-reference/runs/start-test-run.md) or [Chat API](https://docs.qa.tech/api-reference/chat.md).

## Supported File Types

| Platform | File Types |
| - | - |
| Android | `.apk` |
| iOS | `.zip` or `.tar.gz` containing a simulator `.app` (`.ipa` device builds are rejected) |

> [!NOTE]
>
> Android App Bundles (`.aab`) are not supported directly. Convert them to
> `.apk` first. QA.tech runs iOS tests on simulators, so upload a compressed
> simulator `.app`, not an App Store `.ipa`. See [Mobile App
> Testing](https://docs.qa.tech/test-features/mobile-app-testing.md) for build steps.

## Authentication

All endpoints require Bearer token authentication. Create your API key in the QA.tech dashboard: **Organization Settings → API Keys**. The key is shown only once, at creation. See the [API Introduction](https://docs.qa.tech/api-reference/introduction.md#authentication) for details.

## Upload Workflow

Uploading a build is a two-step process, plus the file transfer itself:

1. **[Get Build Upload URL](https://docs.qa.tech/api-reference/application-builds/get-build-upload-url.md)** – Request a presigned URL and a `buildToken` for your file.
2. **Upload the file** – Send the raw file bytes with an HTTP `PUT` request to the presigned `uploadUrl`. No `Authorization` header is needed — the URL is presigned.
3. **[Create Application Build](https://docs.qa.tech/api-reference/application-builds/create-application-build.md)** – Register the uploaded file as a build, using the `buildToken` from step 1. The response includes the build's short ID (e.g. `build_abc123`).
4. **[List Application Builds](https://docs.qa.tech/api-reference/application-builds/list-application-builds.md)** – Retrieve short IDs of builds that already exist for an application.

This flow allows efficient direct uploads to cloud storage without passing the file through the API server. See the linked reference pages for full request, response, and error details.

> [!WARNING]
>
> The presigned URL is temporary and valid for about 2 hours. Upload the file
> promptly after requesting the URL.

## Using Builds in Test Runs

After creating a build, reference its short ID as the environment's `applicationBuildShortId` in an application override when [starting a run](https://docs.qa.tech/api-reference/runs/start-test-run.md) or [creating a chat conversation](https://docs.qa.tech/api-reference/chat.md). The run or chat session will then test against that specific build.

To install additional builds on the same device, pass up to three build short IDs in `otherApplicationBuildShortIds`:

```json theme={null}
{
  "applicationShortId": "app_abc123",
  "environment": {
    "applicationBuildShortId": "build_primary",
    "otherApplicationBuildShortIds": ["build_authenticator", "build_companion"]
  }
}
```

The primary and other builds must belong to the same application, target the same platform, and have distinct bundle IDs or package names.

## Making a Build the Environment Default

A run override applies to one run. GitHub App auto-runs, scheduled runs, and chats without an override use the build stored on the environment. To change that build without the dashboard, call [Update Environment](https://docs.qa.tech/api-reference/applications/update-environment.md):

```bash theme={null}
curl -sSf -X PATCH "https://api.qa.tech/v1/applications/app_abc123/environments/env_def456" \
  -H "Authorization: Bearer $QATECH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"applicationBuildShortId": "build_primary"}'
```

The build must belong to the same application and match the environment's platform. `otherApplicationBuildShortIds` replaces the environment's other apps when you pass it and keeps them when you omit it. See [Keep the environment on the latest merged build](https://docs.qa.tech/pr-testing/agents/mobile.md#keep-the-environment-on-the-latest-merged-build) for a GitHub Actions example.

## Related documentation

* [Mobile App Testing](https://docs.qa.tech/test-features/mobile-app-testing.md) – Mobile testing concepts
* [PR Testing for Mobile Apps](https://docs.qa.tech/pr-testing/agents/mobile.md) – Upload PR binaries from CI and pin runs or change reviews
* [Start Run API](https://docs.qa.tech/api-reference/runs/start-test-run.md) – Run tests against uploaded builds
* [Applications API](https://docs.qa.tech/api-reference/applications.md) – List applications and set an environment's default build
* [API Introduction](https://docs.qa.tech/api-reference/introduction.md) – Authentication and ID reference


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.