Version Management
List an app's versions, mark or clear 'latest', check for app updates, and delete a version.
Endpoints for managing app versions.
List All Versions of an App
Paginated history of every version of an app.
https://www.pgyer.com/apiv2/app/buildsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| _api_key | String | Yes | API Key — see auth |
| appKey | String | Yes | See appKey |
| buildKey | String | No | See buildKey |
| page | Integer | No | Page number for history |
Response
| Field | Type | Description |
|---|---|---|
| buildKey | String | Build Key, unique index ID for the app |
| buildType | Integer | App type (1: iOS; 2: Android) |
| buildFileSize | Integer | Installer size |
| buildName | String | App name |
| buildVersion | String | Version number, default 1.0 |
| buildVersionNo | String | Build version in the uploaded installer, default 1 |
| buildBuildVersion | Integer | Pgyer-generated build number |
| buildIdentifier | String | App package identifier — BundleId on iOS, package name on Android |
| buildIcon | String | App icon key. Access URL is https://cdn-app-icon2.pgyer.com/<buildIconPath>/<buildIcon>?x-oss-process=image/resize,m_lfit,h_120,w_120/format,jpg; buildIconPath is the first 5 chars of buildIcon joined by / |
| buildCreated | String | Upload time |
| pageCount | Integer | Total pages |
| currentPage | Integer | Current page |
{
"code": 0,
"message": "",
"data": {
"pageCount": 3,
"currentPage": 1,
"list": [
{
"buildKey": "a1b2c3d4e5f6",
"buildType": 2,
"buildFileSize": 12345678,
"buildName": "Sample App",
"buildVersion": "1.1",
"buildVersionNo": "28",
"buildBuildVersion": 5,
"buildIdentifier": "com.example.app",
"buildIcon": "123abcdefaaa",
"buildCreated": "2025-01-01 10:00:00"
}
]
}
}Set Latest Version
Mark the version identified by buildKey as the latest.
https://www.pgyer.com/apiv2/app/setNewestVersionRequest Parameters
Response
| Field | Type | Description |
|---|---|---|
| code | Integer | 0 on success; anything greater — see error codes |
| message | String | Result message |
{
"code": 0,
"message": "Set successfully"
}Clear Latest Version
Remove the "latest version" mark from the version identified by buildKey.
https://www.pgyer.com/apiv2/app/cancelNewestVersionRequest Parameters
Response
| Field | Type | Description |
|---|---|---|
| code | Integer | 0 on success; anything greater — see error codes |
| message | String | Result message |
{
"code": 0,
"message": "Cleared successfully"
}Check for App Updates
Check from the client whether a newer version exists and fetch the update info.
https://www.pgyer.com/apiv2/app/checkRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| _api_key | String | Yes | API Key — see auth |
| appKey | String | Yes | See appKey |
| buildVersion | String | No | On Android, pass versionCode as an integer string (for example, String.valueOf(BuildConfig.VERSION_CODE)) whenever possible. For compatibility with legacy callers, non-numeric versionName values such as 1.2.3 are also supported. On iOS, pass the version value. |
| buildBuildVersion | Integer | No | Pgyer's auto-incrementing build number |
| channelKey | String | No | Channel key |
Response
| Field | Type | Description |
|---|---|---|
| buildBuildVersion | Integer | Pgyer-generated build number |
| forceUpdateVersion | String | Force-update version (empty if not forced) |
| forceUpdateVersionNo | String | Force-update build version |
| needForceUpdate | Boolean | Whether the update is forced |
| downloadURL | String | Time-limited app install URL. Use the returned value unchanged; see the validity notes below. |
| appURl | String | App install single-page URL |
| buildHaveNewVersion | Boolean | Whether a new version exists |
| buildVersionNo | String | Build version, default 1 |
| buildVersion | String | Version number, default 1.0 |
| buildDescription | String | App description |
| buildUpdateDescription | String | Release notes |
| appKey | String | Unique app identifier |
| buildKey | String | Unique app-version identifier |
| buildName | String | App name |
| buildIcon | String | App icon |
| buildFileKey | String | File storage key |
| buildFileSize | String | File size |
{
"code": 0,
"message": "",
"data": {
"buildBuildVersion": 5,
"forceUpdateVersion": "",
"forceUpdateVersionNo": "",
"needForceUpdate": false,
"downloadURL": "https://www.pgyer.com/app/installUpdate/a1b2c3d4e5f6?sig=example-signature&forceHttps=1",
"appURl": "https://www.pgyer.com/abcd",
"buildHaveNewVersion": true,
"buildVersionNo": "28",
"buildVersion": "1.1",
"buildDescription": "Sample description",
"buildUpdateDescription": "Various bug fixes",
"appKey": "x1y2z3",
"buildKey": "a1b2c3d4e5f6",
"buildName": "Sample App",
"buildIcon": "123abcdefaaa",
"buildFileKey": "apps/xxx/yyyy/zzzz.apk",
"buildFileSize": "12345678"
}
}Install URL validity
The downloadURL returned by this endpoint contains a temporary installation credential. Its validity depends on the app platform:
| App platform | Returned URL | Validity |
|---|---|---|
| Non-iOS, such as Android | /app/installUpdate/... | Newly generated links are valid for 1 hour from generation. |
| iOS | itms-services://... | The credential used to retrieve the installation manifest is valid for 5 minutes. |
If a link has expired, or installation is deferred, call this endpoint again to obtain a new downloadURL. Previously issued credentials retain their original expiry. These limits apply to the returned installation credentials, not to how long the entire package download may take. appURl is the app installation page; do not apply these limits to all installation pages or short links.
The response example shows a non-iOS URL with a placeholder signature. Use the actual returned value unchanged rather than constructing a URL from the example.
downloadURL contains a temporary installation credential. Treat it as a sensitive link: do not publish it, embed it in public frontend source, or write it to public logs, and restrict retention and access for any logs that capture it. Do not send the complete URL, API key, or install password when requesting support.
Delete a Version
Delete a specific version of an app. To delete the entire app, use Delete App instead.
Deletion cannot be undone. Double-check the buildKey before calling.
https://www.pgyer.com/apiv2/app/buildDeleteRequest Parameters
Response
| Field | Type | Description |
|---|---|---|
| code | Integer | 0 on success; anything greater — see error codes |
{
"code": 0,
"message": ""
}