> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# StartMobileBuild

# Package: containersProjects

# Namespace: ContainersProjects

# Method link: https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/start-mobile-build.md

## Permission Scopes:
Manage AppSmith Projects: SCOPE.CONTAINERS.PROJECTS

## Introduction

Starts building the installable app files of a project, one build for each platform.

The builds run in the background and take several minutes. To follow them, call
[Get Latest Mobile Builds](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-latest-mobile-builds.md)
with `himalayaControlToken`.

For a new `HIMALAYA_MOBILE` project, call
[Claim Himalaya App](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/claim-himalaya-app.md)
before starting a build. For an existing project, call
[Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md)
and specify the returned `canonicalApp`.

If a build can't start for a platform, the response lists that platform in
`failedPlatforms` while returning any builds that did start in `builds`.

---

## REST API

### Schema

```
 Method: startMobileBuild
 Description: Starts building the installable app files of a project, one build for each platform.  The builds run in the background and take several minutes. To follow them, call [Get Latest Mobile Builds](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-latest-mobile-builds.md) with `himalayaControlToken`.  For a new `HIMALAYA_MOBILE` project, call [Claim Himalaya App](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/claim-himalaya-app.md) before starting a build. For an existing project, call [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md) and specify the returned `canonicalApp`.  If a build can't start for a platform, the response lists that platform in `failedPlatforms` while returning any builds that did start in `builds`.
 URL: https://www.wixapis.com/containers/projects/v1/projects/{projectId}/mobile-builds
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  platforms, himalayaControlToken
 Method parameters: 
   param name: androidFormat | type: AndroidFormat | description: Kind of file an Android build makes.  
      - enum:
           APK - An `.apk` file, to install on a phone and test.
           AAB - An `.aab` file (Android App Bundle), the file to upload to Google Play. It can't be installed on a phone.
   param name: appVersion | type: appVersion | description: Version label for the builds, for example `1.2.0`. It's stored with the builds and returned by Get Latest Mobile Builds. It isn't written into the app.  | validation: maxLength 50
   param name: buildKind | type: BuildKind | description: Kind of app-file build.  
      - enum:
           STORE - A build of the owner's app, to install and test or to submit to a store.
           INTERNAL_DEBUG - Debug build.
   param name: canonicalApp | type: canonicalApp | description: Canonical slug of the project's app, exactly as returned in `canonicalApp` by [Claim Himalaya App](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/claim-himalaya-app.md) for a new project or [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md) for an already claimed project.  Required when the project's `platform` is `HIMALAYA_MOBILE`. The value is verified on the server.  | validation: maxLength 200
   param name: himalayaControlToken | type: himalayaControlToken | description: Short-lived control credential for the project's app.  Used for this call only. It isn't stored or returned. | required: true | validation: maxLength 4096
   param name: ownerAuthorization | type: ownerAuthorization | description: The site owner's dashboard authorization: the signed `Authorization` header of this request.  Required when `androidFormat` is `AAB`, to confirm that the caller owns the site.  Used for this call only. It isn't stored or returned.  | validation: maxLength 4096
   param name: platforms | type: array<platforms> | description: Platforms to build. One build is started for each platform. | required: true | validation: minItems 1, maxItems 2
                 - enum:
                 -     IOS: iOS. The build makes an `.ipa` file and an install page.
                 -     ANDROID: Android. The build makes an `.apk` file, or an `.aab` file for Google Play (see `androidFormat`).
   param name: releaseId | type: releaseId | description: GUID of the app release to build. When not specified, the app's live release is built.  | validation: maxLength 200
 Return type: StartMobileBuildResponse
  - name: builds | type: array<MobileBuild> | description: Started builds, one for each platform that was accepted.  | validation: maxItems 2
     - name: jobId | type: string | description: Build GUID.  | validation: maxLength 200
     - name: platform | type: Platform | description: Platform that the build targets.  
         - enum:
         -     IOS: iOS. The build makes an `.ipa` file and an install page.
         -     ANDROID: Android. The build makes an `.apk` file, or an `.aab` file for Google Play (see `androidFormat`).
     - name: releaseId | type: string | description: GUID of the app release that was built.  | validation: maxLength 200
     - name: appVersion | type: string | description: Version label that the owner gave the build when it was started. Can be empty.  | validation: maxLength 50
     - name: status | type: Status | description: Build status.  
         - enum:
         -     IN_PROGRESS: The build is queued or running.
         -     SUCCEEDED: The build finished and its files can be downloaded until `downloadExpiresDate`.
         -     FAILED: The build failed. See `failureKind`.
         -     CANCELED: The build was canceled.
     - name: failureKind | type: FailureKind | description: Why the build failed. Returned only when `status` is `FAILED`.  
         - enum:
         -     SIGNING: The app couldn't be signed.
         -     BUILD: The build failed for another reason.
     - name: himalayaStatus | type: string | description: Status reported by the build system, for diagnostics only.  | validation: maxLength 50
     - name: errorMessage | type: string | description: Error text reported by the build system, for diagnostics only. Don't parse it.  | validation: maxLength 2000
     - name: downloadUrl | type: string | description: URL of the built file: an `.ipa` file for iOS, or an `.apk` or `.aab` file for Android. Returned only when `status` is `SUCCEEDED`. Can be empty for iOS.  | validation: format WEB_URL
     - name: installPageUrl | type: string | description: iOS only. URL of the page that installs the app on an iPhone. Returned only when `status` is `SUCCEEDED`. Can be empty.  | validation: format WEB_URL
     - name: downloadExpiresDate | type: string | description: Date and time the download links expire, about 7 days after the build.  | validation: format date-time
     - name: downloadExpired | type: boolean | description: Whether the download links have expired. To get new links, start a new build.  
     - name: createdDate | type: string | description: Date and time the build was started.  | validation: format date-time
     - name: builtDate | type: string | description: Date and time the build was first seen as `SUCCEEDED`.  | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the build last changed.  | validation: format date-time
     - name: androidFormat | type: AndroidFormat | description: Android only. Kind of file the build made: an `.apk` to install and test, or an `.aab` to upload to Google Play.  
         - enum:
         -     APK: An `.apk` file, to install on a phone and test.
         -     AAB: An `.aab` file (Android App Bundle), the file to upload to Google Play. It can't be installed on a phone.
     - name: apkDownloadUrl | type: string | description: Android `AAB` builds only. URL of an `.apk` file of the same build, to install on a phone and test. Returned only when `status` is `SUCCEEDED`. Can be empty. Expires with `downloadUrl`.  | validation: format WEB_URL
     - name: buildKind | type: BuildKind | description: Kind of build. Builds started before the field existed are `STORE`.  
         - enum:
         -     STORE: A build of the owner's app, to install and test or to submit to a store.
         -     INTERNAL_DEBUG: Debug build.
  - name: failedPlatforms | type: array<FailedMobileBuildPlatform> | description: Platforms whose build couldn't be started. Empty when every platform was started.  | validation: maxItems 2
     - name: platform | type: Platform | description: Platform.  
     - name: errorCode | type: string | description: Error code reported by the build system.  | validation: maxLength 200
     - name: errorMessage | type: string | description: Error text reported by the build system, for diagnostics only.  | validation: maxLength 2000

 Possible Errors:
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: INTERNAL_DEBUG_STAFF_ONLY | Description: The requested `buildKind` is available to Wix staff only.


```

### Examples

### Start Mobile Build
Starts building the installable app files of a project for iOS and Android.

```curl
curl -X POST \
'https://www.wixapis.com/containers/projects/v1/projects/8046df3c-7575-4098-a5ab-c91ad8f33c47/mobile-builds' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "platforms": ["IOS", "ANDROID"],
  "releaseId": "rel-4f9c2a1b7d3e",
  "appVersion": "1.2.0",
  "himalayaControlToken": "<CONTROL_TOKEN>",
  "canonicalApp": "coffee-corner-8046df3c"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.containers.projects.startMobileBuild(projectId, platforms, options)
 Description: Starts building the installable app files of a project, one build for each platform.  The builds run in the background and take several minutes. To follow them, call [Get Latest Mobile Builds](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-latest-mobile-builds.md) with `himalayaControlToken`.  For a new `HIMALAYA_MOBILE` project, call [Claim Himalaya App](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/claim-himalaya-app.md) before starting a build. For an existing project, call [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md) and specify the returned `canonicalApp`.  If a build can't start for a platform, the response lists that platform in `failedPlatforms` while returning any builds that did start in `builds`.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  projectId, platforms, options.himalayaControlToken, options
 Method parameters: 
   param name: options | type: StartMobileBuildOptions  none | required: true 
        - name: releaseId | type: string | description: GUID of the app release to build. When not specified, the app's live release is built.  | validation: maxLength 200
        - name: appVersion | type: string | description: Version label for the builds, for example `1.2.0`. It's stored with the builds and returned by Get Latest Mobile Builds. It isn't written into the app.  | validation: maxLength 50
        - name: himalayaControlToken | type: string | description: Short-lived control credential for the project's app.  Used for this call only. It isn't stored or returned. | required: true | validation: maxLength 4096
        - name: canonicalApp | type: string | description: Canonical slug of the project's app, exactly as returned in `canonicalApp` by [Claim Himalaya App](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/claim-himalaya-app.md) for a new project or [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md) for an already claimed project.  Required when the project's `platform` is `HIMALAYA_MOBILE`. The value is verified on the server.  | validation: maxLength 200
        - name: androidFormat | type: AndroidFormat | description: Android only. Kind of file to build.  `AAB` builds the file to upload to Google Play, under the package name saved for the app. With `AAB`, `platforms` must contain only `ANDROID`, and `ownerAuthorization` is required.  Default: `APK`  
             - enum:
             -     APK: An `.apk` file, to install on a phone and test.
             -     AAB: An `.aab` file (Android App Bundle), the file to upload to Google Play. It can't be installed on a phone.
        - name: ownerAuthorization | type: string | description: The site owner's dashboard authorization: the signed `Authorization` header of this request.  Required when `androidFormat` is `AAB`, to confirm that the caller owns the site.  Used for this call only. It isn't stored or returned.  | validation: maxLength 4096
        - name: buildKind | type: BuildKind | description: Kind of build.  Default: `STORE`  
             - enum:
             -     STORE: A build of the owner's app, to install and test or to submit to a store.
             -     INTERNAL_DEBUG: Debug build.
   param name: platforms | type: array<array> | description: Platforms to build. One build is started for each platform. | required: true | validation: minItems 1, maxItems 2
                 - enum:
                 -     IOS: iOS. The build makes an `.ipa` file and an install page.
                 -     ANDROID: Android. The build makes an `.apk` file, or an `.aab` file for Google Play (see `androidFormat`).
   param name: projectId | type: string | description: GUID of the project to build. | required: true | validation: format GUID
 Return type: PROMISE<StartMobileBuildResponse>
  - name: builds | type: array<MobileBuild> | description: Started builds, one for each platform that was accepted.  | validation: maxItems 2
     - name: jobId | type: string | description: Build GUID.  | validation: maxLength 200
     - name: platform | type: Platform | description: Platform that the build targets.  
         - enum:
         -     IOS: iOS. The build makes an `.ipa` file and an install page.
         -     ANDROID: Android. The build makes an `.apk` file, or an `.aab` file for Google Play (see `androidFormat`).
     - name: releaseId | type: string | description: GUID of the app release that was built.  | validation: maxLength 200
     - name: appVersion | type: string | description: Version label that the owner gave the build when it was started. Can be empty.  | validation: maxLength 50
     - name: status | type: Status | description: Build status.  
         - enum:
         -     IN_PROGRESS: The build is queued or running.
         -     SUCCEEDED: The build finished and its files can be downloaded until `downloadExpiresDate`.
         -     FAILED: The build failed. See `failureKind`.
         -     CANCELED: The build was canceled.
     - name: failureKind | type: FailureKind | description: Why the build failed. Returned only when `status` is `FAILED`.  
         - enum:
         -     SIGNING: The app couldn't be signed.
         -     BUILD: The build failed for another reason.
     - name: himalayaStatus | type: string | description: Status reported by the build system, for diagnostics only.  | validation: maxLength 50
     - name: errorMessage | type: string | description: Error text reported by the build system, for diagnostics only. Don't parse it.  | validation: maxLength 2000
     - name: downloadUrl | type: string | description: URL of the built file: an `.ipa` file for iOS, or an `.apk` or `.aab` file for Android. Returned only when `status` is `SUCCEEDED`. Can be empty for iOS.  | validation: format WEB_URL
     - name: installPageUrl | type: string | description: iOS only. URL of the page that installs the app on an iPhone. Returned only when `status` is `SUCCEEDED`. Can be empty.  | validation: format WEB_URL
     - name: downloadExpiresDate | type: Date | description: Date and time the download links expire, about 7 days after the build.  
     - name: downloadExpired | type: boolean | description: Whether the download links have expired. To get new links, start a new build.  
     - name: _createdDate | type: Date | description: Date and time the build was started.  
     - name: builtDate | type: Date | description: Date and time the build was first seen as `SUCCEEDED`.  
     - name: _updatedDate | type: Date | description: Date and time the build last changed.  
     - name: androidFormat | type: AndroidFormat | description: Android only. Kind of file the build made: an `.apk` to install and test, or an `.aab` to upload to Google Play.  
         - enum:
         -     APK: An `.apk` file, to install on a phone and test.
         -     AAB: An `.aab` file (Android App Bundle), the file to upload to Google Play. It can't be installed on a phone.
     - name: apkDownloadUrl | type: string | description: Android `AAB` builds only. URL of an `.apk` file of the same build, to install on a phone and test. Returned only when `status` is `SUCCEEDED`. Can be empty. Expires with `downloadUrl`.  | validation: format WEB_URL
     - name: buildKind | type: BuildKind | description: Kind of build. Builds started before the field existed are `STORE`.  
         - enum:
         -     STORE: A build of the owner's app, to install and test or to submit to a store.
         -     INTERNAL_DEBUG: Debug build.
  - name: failedPlatforms | type: array<FailedMobileBuildPlatform> | description: Platforms whose build couldn't be started. Empty when every platform was started.  | validation: maxItems 2
     - name: platform | type: Platform | description: Platform.  
     - name: errorCode | type: string | description: Error code reported by the build system.  | validation: maxLength 200
     - name: errorMessage | type: string | description: Error text reported by the build system, for diagnostics only.  | validation: maxLength 2000

 Possible Errors:
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: INTERNAL_DEBUG_STAFF_ONLY | Description: The requested `buildKind` is available to Wix staff only.


```

### Examples

### Build the app files for iOS and Android
Starts one build for each platform and labels the builds with an app version.

```javascript
import { projects } from "@wix/containers";

async function startMobileBuild() {
  const response = await projects.startMobileBuild(
    "8046df3c-7575-4098-a5ab-c91ad8f33c47",
    ["IOS", "ANDROID"],
    {
      releaseId: "rel-4f9c2a1b7d3e",
      appVersion: "1.2.0",
      himalayaControlToken: "<CONTROL_TOKEN>",
      canonicalApp: "coffee-corner-8046df3c",
    },
  );
}

/* Promise resolves to:
 * {
 *   "builds": [
 *     {
 *       "jobId": "dist-7c1e9a2b4d6f",
 *       "platform": "IOS",
 *       "buildKind": "STORE",
 *       "releaseId": "rel-4f9c2a1b7d3e",
 *       "appVersion": "1.2.0",
 *       "status": "IN_PROGRESS",
 *       "himalayaStatus": "QUEUED",
 *       "createdDate": "2026-10-25T10:00:00.000Z",
 *       "updatedDate": "2026-10-25T10:00:00.000Z"
 *     },
 *     {
 *       "jobId": "dist-3b8d5f0e2a94",
 *       "platform": "ANDROID",
 *       "buildKind": "STORE",
 *       "androidFormat": "APK",
 *       "releaseId": "rel-4f9c2a1b7d3e",
 *       "appVersion": "1.2.0",
 *       "status": "IN_PROGRESS",
 *       "himalayaStatus": "QUEUED",
 *       "createdDate": "2026-10-25T10:00:00.000Z",
 *       "updatedDate": "2026-10-25T10:00:00.000Z"
 *     }
 *   ],
 *   "failedPlatforms": []
 * }
 */

```

### startMobileBuild (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { projects } from '@wix/containers';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { projects },
  // Include the auth strategy and host as relevant
});


async function startMobileBuild(projectId,platforms,options) {
  const response = await myWixClient.projects.startMobileBuild(projectId,platforms,options);
};
```

---