Skip to content

Update Auto-Renewal Switch ​

Enable or disable auto-renewal for one resource. Only the switch of an existing policy is modified; SKU, package and currency are not submitted or modified.

Interface Address:

text
/papi/wallet/auto-renew/update

Request Method:

text
POST

Content-Type:

text
application/json

Header Parameters:

ParameterTypeRequiredDescription
X-Access-KeystringYesAPI access key ID. See API Rules for authentication
X-SignaturestringYesSignature value, Base64-encoded HMAC-SHA256 result
X-TimestampstringYesMillisecond-level Unix timestamp (13 digits)
X-NoncestringYesRandom string, 10~32 lowercase letters and digits

Body Parameters (single resource):

ParameterTypeRequiredDescription
resourceTypeintegerYesResource type: 1 cloud phone, 4 proxy IP, 6 cloud disk; one request covers one resource type
resourceUidstringYesResource identifier from the policy list
enabledbooleanYestrue to enable, false to disable

Request Example (single resource):

json
{
  "resourceType": 1,
  "resourceUid": "resourceUid from the policy list",
  "enabled": true
}

Response Parameters:

ParameterTypeDescription
codeintegerError code. See Error Codes
dataobjectUpdated policy object
├─ resourceTypeintegerResource type: 1 cloud phone, 4 proxy IP, 6 cloud disk
├─ resourceUidstringResource identifier
├─ enabledintegerAuto-renewal switch: 0 disabled, 1 enabled (boolean is used in requests)
├─ statusstringPolicy status
├─ currencystringCurrency code
├─ skuCodestringSKU code
├─ packageCodestringPackage code
msgstringError message

Response Example:

json
{
  "code": 0,
  "data": {
    "resourceType": 1,
    "resourceUid": "",
    "enabled": 1,
    "status": "",
    "currency": "USD",
    "skuCode": "",
    "packageCode": ""
  },
  "msg": ""
}

Notes:

  • The policy must exist and the payer, team and resource ownership checks must pass; enabling also validates the resource, SKU, package and validity period.
  • Disabling keeps the existing resource and package information; cloud disks are per purchase record and cannot be replaced with a team ID.

OpenAPI Docs