---
title: "Upload application file"
method: POST
path: "/v1/apps/upload"
tags: ["apps"]
---

# Upload application file

`POST /v1/apps/upload`

Upload a mobile application file (APK/IPA/AAB) to QualGent.

    **How it works:**
    - Server detects file size as it streams in
    - Files < 32MB: Processed directly (fast path)
    - Files ≥ 32MB: Automatically chunked server-side (no client chunking needed)
    - **AAB files**: Converted to universal APK before storage when conversion is enabled; only the APK is stored. If conversion fails, the AAB is stored as-is. Other file types are stored unchanged.

    **Benefits:**
    - Simple: Just upload like any normal file
    - Works with standard multipart/form-data
    - No client-side chunking logic required
    - Compatible with curl, Postman, fetch, etc.

    **Form Data:**
    - `file`: The file to upload (multipart/form-data)
    - `app_name`: Application name (required)
    - `version`: Application version (required)
    - `os`: (optional) Operating system name (auto-inferred from file extension if not provided)

    **Storage Path Format:**
    - `{user_id}/{timestamp}-{app_name}-{version}.{ext}` (ext is .apk when AAB was converted)

## Headers

- `x-api-key` string

## Response `200`

File uploaded successfully

- UploadResponse — Response after successful file upload
  - `success` boolean, required — Whether upload succeeded
  - `file` FileMetadata, required — File metadata after upload
    - `id` string, nullable — Unique file record ID — pass as app_file_id on subsequent run submissions
    - `file_path` string, required — Storage path of uploaded file
    - `filename` string, required — Generated filename
    - `original_name` string, required — Original uploaded filename
    - `file_size` integer, required — File size in bytes
    - `file_type` string, nullable, required — MIME type
    - `app_name` string, nullable, required — Application name
    - `version` string, nullable, required — Application version
    - `os` string, nullable, required — Operating system
    - `package_name` string, nullable, required — Package name (Android) or bundle ID (iOS)
    - `user_id` string, required — User ID who uploaded the file
    - `organization_id` string, required — Organization ID

## Other responses

- `401` — Invalid or missing API key
- `413` — File size exceeds maximum allowed
- `422` — Validation Error
- `500` — Failed to upload to storage or persist metadata

---

[API](https://skmtc.dev/qualgent/apis/qualgent-api-service.md) · [All operations](https://skmtc.dev/qualgent/apis/qualgent-api-service/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qualgent/qualgent-api-service/revisions/2372ed4904a6/schema)
