Pgyer Docs
API 2.0

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.

POSThttps://www.pgyer.com/apiv2/app/builds

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
appKeyStringYesSee appKey
buildKeyStringNoSee buildKey
pageIntegerNoPage number for history

Response

FieldTypeDescription
buildKeyStringBuild Key, unique index ID for the app
buildTypeIntegerApp type (1: iOS; 2: Android)
buildFileSizeIntegerInstaller size
buildNameStringApp name
buildVersionStringVersion number, default 1.0
buildVersionNoStringBuild version in the uploaded installer, default 1
buildBuildVersionIntegerPgyer-generated build number
buildIdentifierStringApp package identifier — BundleId on iOS, package name on Android
buildIconStringApp 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 /
buildCreatedStringUpload time
pageCountIntegerTotal pages
currentPageIntegerCurrent 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.

POSThttps://www.pgyer.com/apiv2/app/setNewestVersion

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
buildKeyStringNoSee buildKey

Response

FieldTypeDescription
codeInteger0 on success; anything greater — see error codes
messageStringResult message
{
  "code": 0,
  "message": "Set successfully"
}

Clear Latest Version

Remove the "latest version" mark from the version identified by buildKey.

POSThttps://www.pgyer.com/apiv2/app/cancelNewestVersion

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
buildKeyStringNoSee buildKey

Response

FieldTypeDescription
codeInteger0 on success; anything greater — see error codes
messageStringResult message
{
  "code": 0,
  "message": "Cleared successfully"
}

Check for App Updates

Check from the client whether a newer version exists and fetch the update info.

POSThttps://www.pgyer.com/apiv2/app/check

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
appKeyStringYesSee appKey
buildVersionStringNoOn 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.
buildBuildVersionIntegerNoPgyer's auto-incrementing build number
channelKeyStringNoChannel key

Response

FieldTypeDescription
buildBuildVersionIntegerPgyer-generated build number
forceUpdateVersionStringForce-update version (empty if not forced)
forceUpdateVersionNoStringForce-update build version
needForceUpdateBooleanWhether the update is forced
downloadURLStringTime-limited app install URL. Use the returned value unchanged; see the validity notes below.
appURlStringApp install single-page URL
buildHaveNewVersionBooleanWhether a new version exists
buildVersionNoStringBuild version, default 1
buildVersionStringVersion number, default 1.0
buildDescriptionStringApp description
buildUpdateDescriptionStringRelease notes
appKeyStringUnique app identifier
buildKeyStringUnique app-version identifier
buildNameStringApp name
buildIconStringApp icon
buildFileKeyStringFile storage key
buildFileSizeStringFile 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 platformReturned URLValidity
Non-iOS, such as Android/app/installUpdate/...Newly generated links are valid for 1 hour from generation.
iOSitms-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.

POSThttps://www.pgyer.com/apiv2/app/buildDelete

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
buildKeyStringYesSee buildKey

Response

FieldTypeDescription
codeInteger0 on success; anything greater — see error codes
{
  "code": 0,
  "message": ""
}

On this page