> 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

# GetLatestMobileBuilds

# Package: containersProjects

# Namespace: ContainersProjects

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

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

## Introduction

Retrieves the latest app-file builds of a project: for each platform, the last build that was
started and the last build that succeeded.

The caller must be authorized to work on the project's app, as for
[Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md).

When `himalayaControlToken` is specified, builds that are still in progress are refreshed
before the response. Without it, the stored state is returned as is.

---

## REST API

### Schema

```
 Method: getLatestMobileBuilds
 Description: Retrieves the latest app-file builds of a project: for each platform, the last build that was started and the last build that succeeded.  The caller must be authorized to work on the project's app, as for [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md).  When `himalayaControlToken` is specified, builds that are still in progress are refreshed before the response. Without it, the stored state is returned as is.
 URL: https://www.wixapis.com/containers/projects/v1/projects/{projectId}/mobile-builds/latest
 Method: POST
 Method parameters:
   param name: himalayaControlToken | type: himalayaControlToken | description: Short-lived control credential for the project's app.  When specified, builds in progress are refreshed before the response. Used for this call only. It isn't stored or returned.  | validation: maxLength 4096
 Return type: GetLatestMobileBuildsResponse
  - name: platforms | type: array<PlatformMobileBuilds> | description: Latest builds for each platform: iOS first, then Android.  | validation: maxItems 4
     - name: platform | type: Platform | description: Platform.  
         - 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: lastAttempt | type: MobileBuild | description: The last build that was started, in any status. Not returned when no build was started.  
        - name: jobId | type: string | description: Build GUID.  | validation: maxLength 200
        - name: platform | type: Platform | description: Platform that the build targets.  
        - 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: lastSuccessfulBuild | type: MobileBuild | description: The last build that succeeded. Its links can be expired. Not returned when no build succeeded.  
     - name: buildKind | type: BuildKind | description: Kind of the builds in this entry.  
  - name: refreshFailed | type: boolean | description: Whether refreshing builds in progress failed. When `true`, the stored state is returned.  
  - name: supportedBuildKinds | type: array<BuildKind> | description: Kinds of build that the caller can start with [Start Mobile Build](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/start-mobile-build.md).  | validation: maxItems 2


```

### Examples

### Get Latest Mobile Builds
Retrieves the last started and the last successful app-file build of a project for each platform.

```curl
curl -X POST \
'https://www.wixapis.com/containers/projects/v1/projects/8046df3c-7575-4098-a5ab-c91ad8f33c47/mobile-builds/latest' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "himalayaControlToken": "<CONTROL_TOKEN>"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.containers.projects.getLatestMobileBuilds(projectId, options)
 Description: Retrieves the latest app-file builds of a project: for each platform, the last build that was started and the last build that succeeded.  The caller must be authorized to work on the project's app, as for [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization.md).  When `himalayaControlToken` is specified, builds that are still in progress are refreshed before the response. Without it, the stored state is returned as is.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  projectId
 Method parameters: 
   param name: options | type: GetLatestMobileBuildsOptions  none  
        - name: himalayaControlToken | type: string | description: Short-lived control credential for the project's app.  When specified, builds in progress are refreshed before the response. Used for this call only. It isn't stored or returned.  | validation: maxLength 4096
   param name: projectId | type: string | description: GUID of the project. | required: true | validation: format GUID
 Return type: PROMISE<GetLatestMobileBuildsResponse>
  - name: platforms | type: array<PlatformMobileBuilds> | description: Latest builds for each platform: iOS first, then Android.  | validation: maxItems 4
     - name: platform | type: Platform | description: Platform.  
         - 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: lastAttempt | type: MobileBuild | description: The last build that was started, in any status. Not returned when no build was started.  
        - name: jobId | type: string | description: Build GUID.  | validation: maxLength 200
        - name: platform | type: Platform | description: Platform that the build targets.  
        - 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: lastSuccessfulBuild | type: MobileBuild | description: The last build that succeeded. Its links can be expired. Not returned when no build succeeded.  
     - name: buildKind | type: BuildKind | description: Kind of the builds in this entry.  
  - name: refreshFailed | type: boolean | description: Whether refreshing builds in progress failed. When `true`, the stored state is returned.  
  - name: supportedBuildKinds | type: array<BuildKind> | description: Kinds of build that the caller can start with [Start Mobile Build](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/start-mobile-build.md).  | validation: maxItems 2


```

### Examples

### Get the latest app-file builds
Refreshes builds in progress and returns the last started and the last successful build for each platform.

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

async function getLatestMobileBuilds() {
  const response = await projects.getLatestMobileBuilds(
    "8046df3c-7575-4098-a5ab-c91ad8f33c47",
    {
      himalayaControlToken: "<CONTROL_TOKEN>",
    },
  );
}

/* Promise resolves to:
 * {
 *   "platforms": [
 *     {
 *       "platform": "IOS",
 *       "buildKind": "STORE",
 *       "lastAttempt": {
 *         "jobId": "dist-7c1e9a2b4d6f",
 *         "platform": "IOS",
 *         "buildKind": "STORE",
 *         "releaseId": "rel-4f9c2a1b7d3e",
 *         "appVersion": "1.2.0",
 *         "status": "SUCCEEDED",
 *         "himalayaStatus": "SUCCESS",
 *         "downloadUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner.ipa?X-Amz-Date=20261025T100800Z&X-Amz-Expires=604800",
 *         "installPageUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner-install.html",
 *         "downloadExpiresDate": "2026-11-01T10:08:00.000Z",
 *         "downloadExpired": false,
 *         "createdDate": "2026-10-25T10:00:00.000Z",
 *         "builtDate": "2026-10-25T10:08:00.000Z",
 *         "updatedDate": "2026-10-25T10:08:00.000Z"
 *       },
 *       "lastSuccessfulBuild": {
 *         "jobId": "dist-7c1e9a2b4d6f",
 *         "platform": "IOS",
 *         "buildKind": "STORE",
 *         "releaseId": "rel-4f9c2a1b7d3e",
 *         "appVersion": "1.2.0",
 *         "status": "SUCCEEDED",
 *         "himalayaStatus": "SUCCESS",
 *         "downloadUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner.ipa?X-Amz-Date=20261025T100800Z&X-Amz-Expires=604800",
 *         "installPageUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner-install.html",
 *         "downloadExpiresDate": "2026-11-01T10:08:00.000Z",
 *         "downloadExpired": false,
 *         "createdDate": "2026-10-25T10:00:00.000Z",
 *         "builtDate": "2026-10-25T10:08:00.000Z",
 *         "updatedDate": "2026-10-25T10:08:00.000Z"
 *       }
 *     },
 *     {
 *       "platform": "ANDROID",
 *       "buildKind": "STORE",
 *       "lastAttempt": {
 *         "jobId": "dist-5a2c8e1f7b30",
 *         "platform": "ANDROID",
 *         "buildKind": "STORE",
 *         "androidFormat": "APK",
 *         "releaseId": "rel-4f9c2a1b7d3e",
 *         "appVersion": "1.2.0",
 *         "status": "SUCCEEDED",
 *         "himalayaStatus": "SUCCESS",
 *         "downloadUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner.apk?X-Amz-Date=20261025T101200Z&X-Amz-Expires=604800",
 *         "downloadExpiresDate": "2026-11-01T10:12:00.000Z",
 *         "downloadExpired": false,
 *         "createdDate": "2026-10-25T10:00:00.000Z",
 *         "builtDate": "2026-10-25T10:12:00.000Z",
 *         "updatedDate": "2026-10-25T10:12:00.000Z"
 *       },
 *       "lastSuccessfulBuild": {
 *         "jobId": "dist-5a2c8e1f7b30",
 *         "platform": "ANDROID",
 *         "buildKind": "STORE",
 *         "androidFormat": "APK",
 *         "releaseId": "rel-4f9c2a1b7d3e",
 *         "appVersion": "1.2.0",
 *         "status": "SUCCEEDED",
 *         "himalayaStatus": "SUCCESS",
 *         "downloadUrl": "https://example-bucket.s3.amazonaws.com/dist/coffee-corner.apk?X-Amz-Date=20261025T101200Z&X-Amz-Expires=604800",
 *         "downloadExpiresDate": "2026-11-01T10:12:00.000Z",
 *         "downloadExpired": false,
 *         "createdDate": "2026-10-25T10:00:00.000Z",
 *         "builtDate": "2026-10-25T10:12:00.000Z",
 *         "updatedDate": "2026-10-25T10:12:00.000Z"
 *       }
 *     }
 *   ],
 *   "refreshFailed": false,
 *   "supportedBuildKinds": ["STORE"]
 * }
 */

```

### getLatestMobileBuilds (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 getLatestMobileBuilds(projectId,options) {
  const response = await myWixClient.projects.getLatestMobileBuilds(projectId,options);
};
```

---