App Settings
Read and partially update persistent app settings, including installation options, download availability and automatic same-version cleanup.
These endpoints manage persistent settings for an entire app, sharing data and validation with Dashboard. Continue using App Info for individual build details.
Read App Settings
Returns current settings and available operations. GET is also supported, but POST avoids placing your API Key in the URL.
https://www.pgyer.com/apiv2/app/settingsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| _api_key | String | Yes | Account API Key; see Authentication |
| appKey | String | Yes | App-level key from the app list, not an individual buildKey |
Response
data includes current values of the writable settings below, except that plaintext buildPassword and appInstallAnswer are never returned. It also includes:
| Field | Type | Description |
|---|---|---|
| appKey | String | App identifier |
| buildPasswordSet | Boolean | Whether an installation password is set |
| appInstallAnswerSet | Boolean | Whether an installation answer is set |
| allowedInstallTypes | Array | Supported installation modes, using the numbers below |
| abmEnabled | Boolean | Whether ABM installation is enabled |
| appSameVersionCleanupAvailable | Boolean | Whether this account can manage this app's same-version cleanup |
| appSameVersionCleanupRevision | Integer / null | Cleanup setting revision; pass it back when changing the switch. Null when unavailable or unauthorized |
When appSameVersionCleanupAvailable=false, appSameVersionCleanup is also null; this does not mean the setting is disabled.
{
"code": 0,
"message": "",
"data": {
"appKey": "0123456789abcdef0123456789abcdef",
"appDownloadStatus": 1,
"appDownloadNameType": 2,
"appAutoSync": 2,
"appDisplayAds": 1,
"appLang": 3,
"appFeedbackStatus": 2,
"appShowPgyerCopyright": 1,
"appDisplayInstallGuide": 1,
"appDisplayHistory": 1,
"buildVersionType": 1,
"buildInstallType": 2,
"buildPasswordSet": true,
"appInstallQuestion": "",
"appInstallAnswerSet": false,
"appIsInstallDate": 2,
"appInstallStartDate": "",
"appInstallEndDate": "",
"appSameVersionCleanupAvailable": true,
"appSameVersionCleanup": 2,
"appSameVersionCleanupRevision": 0,
"allowedInstallTypes": [1, 2, 3, 4, 5],
"abmEnabled": false
}
}Update App Settings
Send only fields you want to change. Omitted settings are preserved. All fields are saved together; if any field fails validation, the entire request is rejected without applying any changes.
https://www.pgyer.com/apiv2/app/updateSettingsRequest Parameters
Send an application/x-www-form-urlencoded form containing _api_key, appKey, and at least one setting. Unknown fields, arrays, null values and invalid enums are rejected. Switches use the existing API convention of 1 / 2, not 0 / 1.
| Parameter | Type | Description |
|---|---|---|
| buildVersionType | Integer | Build numbering: 1 Pgyer sequence; 2 original installer Build |
| buildInstallType | Integer | 1 public; 2 password; 3 team; 4 question and answer; 5 authorization code. Must be in allowedInstallTypes |
| buildPassword | String | Installation password, up to 100 characters. Password mode requires a valid password; omit to keep an existing one |
| appInstallQuestion | String | Installation question, up to 50 characters |
| appInstallAnswer | String | Installation answer, up to 50 characters. Question-and-answer mode requires valid values for both |
| appDownloadStatus | Integer | Downloads: 1 enabled; 2 disabled. Does not bypass platform moderation restrictions |
| appDownloadNameType | Integer | Filename: 1 original; 2 app name_version |
| appIsInstallDate | Integer | Download validity period: 1 enabled; 2 disabled (also clears both dates) |
| appInstallStartDate | String | Start date: YYYY-MM-DD. Uses the existing download validity rules; time-of-day is not supported |
| appInstallEndDate | String | End date, same format, not earlier than start. Supply both dates when first enabling the period |
| appAutoSync | Integer | Sync app store information: 1 enabled; 2 disabled. Unsupported for HarmonyOS |
| appDisplayAds | Integer | 1 show ads (do not use an ad-removal pack); 2 enable ad-removal packs. Actual ad removal follows account entitlements |
| appLang | String / Integer | auto, zh-CN, en, ru, fr, de, it, ja, pl, es, th, zh-TW; numeric codes below are also accepted |
| appFeedbackStatus | Integer | User feedback form: 1 enabled; 2 disabled |
| appShowPgyerCopyright | Integer | Pgyer copyright: 1 show; 2 hide. Display remains subject to account entitlements |
| appDisplayInstallGuide | Integer | Installation guide: 1 show; 2 hide. Android and HarmonyOS only |
| appDisplayHistory | Integer | Installation-page version history: 1 show; 2 hide. This does not delete versions |
| appSameVersionCleanup | Integer | Automatic same-version cleanup: 1 enabled; 2 disabled (default). Only the owning main account can change this |
| appSameVersionCleanupRevision | Integer | Required with the cleanup switch; use the latest revision returned by the read endpoint |
Language codes: 1 Simplified Chinese, 2 English, 3 auto, 4 Russian, 5 French, 6 German, 7 Italian, 8 Japanese, 9 Polish, 10 Spanish, 11 Thai, 12 Traditional Chinese. Responses always return a numeric appLang.
Changing installation mode clears credentials that no longer apply. Unrelated fields remain unchanged. If ABM installation is enabled, disable it in Dashboard before changing installation mode. Use the existing management interface for TestFlight apps or apps without a published build.
Automatic Same-Version Cleanup
When enabled, subsequent new uploads trigger cleanup after successful publication and approval. Historical versions of this app with the same version number are eligible; Build numbers may differ. The most recently published build for that version number and protected builds are retained. Saving the setting does not itself run cleanup.
This setting is independent of account storage quota policies: it does not require exceeding quota and does not wait for the quota enforcement date. Web and API uploads both follow it without an additional upload parameter. The default is disabled, and it applies only to new uploads after enabling it.
Read the latest revision before changing the switch. This prevents overwriting a more recent change from Dashboard or another API client. After error 1402, read again and confirm the intended value rather than blindly retrying the old revision.
Permissions
Reading and updating ordinary settings follow Dashboard app-management permissions. Only the owning main account can manage same-version cleanup; other authorized members can still manage ordinary settings. An account API Key cannot manage an unauthorized app. Existing restrictions on subaccount API Keys remain unchanged.
Response
On success, code=0 and data contains the saved settings in the same format as the read endpoint. Example error:
{"code": 1402, "message": "清理设置已变化,请重新查询后再提交"}| code | Description |
|---|---|
| 1001 / 1002 / 1003 | Missing or invalid API Key, or unsupported account type |
| 1009 | App missing, deleted or without a manageable published build |
| 1033 | No management permission, or a non-owner tried to change cleanup |
| 1400 | Invalid setting, value or combination; see message |
| 1401 | Settings temporarily unavailable; retry later |
| 1402 | Stale cleanup revision; read current settings again |
| 1403 | Unsupported HTTP method; updates require POST |
Examples
Read settings:
curl -X POST 'https://www.pgyer.com/apiv2/app/settings' \
--data-urlencode "_api_key=$PGYER_API_KEY" \
--data-urlencode 'appKey=0123456789abcdef0123456789abcdef'Change only version-history visibility and language:
curl -X POST 'https://www.pgyer.com/apiv2/app/updateSettings' \
--data-urlencode "_api_key=$PGYER_API_KEY" \
--data-urlencode 'appKey=0123456789abcdef0123456789abcdef' \
--data-urlencode 'appDisplayHistory=1' \
--data-urlencode 'appLang=en'Enable same-version cleanup. Replace the example revision of 0 with the actual revision from your read response:
curl -X POST 'https://www.pgyer.com/apiv2/app/updateSettings' \
--data-urlencode "_api_key=$PGYER_API_KEY" \
--data-urlencode 'appKey=0123456789abcdef0123456789abcdef' \
--data-urlencode 'appSameVersionCleanup=1' \
--data-urlencode 'appSameVersionCleanupRevision=0'