Renew Device Membership
Batch update device membership expiry with flexible matching and renewal modes.
/api/device/membership/renewRequest Parameters
All parameters can be passed via Query or Body
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Required | User API token Example: your_api_token_here |
mode | string | Optional | Renew mode: extend, set, or permanent. Defaults to set when expire_time is provided, otherwise extend extendsetpermanent Example: extend |
base | string | Optional | Extend base: auto, current, or now autocurrentnow Example: auto |
days | number | Optional | Days to add in extend mode Example: 30 |
seconds | number | Optional | Seconds to add in extend mode. Higher priority than days Example: 2592000 |
duration | string | Optional | Duration expression: 30d, 12h, 60m, or 3600s Example: 30d |
expire_time | number | Optional | New expiry timestamp for set mode, seconds or milliseconds. 0 means permanent Example: 1772267945 |
kid | string | Optional | Single device KID Example: KID001 |
udid | string | Optional | Single device UDID Example: 00008030-001234567890002E |
kids | array | Optional | Device KID array. Comma/space/newline separated strings are also supported Example: KID001,KID002 |
udids | array | Optional | Device UDID array. If one UDID has multiple certificates, match=all updates all by default. Comma/space/newline separated strings are also supported Example: 00008030-001234567890002E |
items | array | Optional | Advanced batch items. Each item can include kid or udid and override mode/base/days/seconds/duration/expire_time Example: [{"kid":"KID001","mode":"extend","days":30},{"udid":"00008030-001234567890002E","mode":"permanent"}] |
match | string | Optional | Multiple match handling: all, first, or error. Default all allfirsterror Example: all |
continue_on_error | boolean | Optional | Whether to continue after an item fails. Default true Example: true |
Response
| Parameter | Type | Required | Description |
|---|---|---|---|
code | number | Required | Status code: 1=request processed Example: 1 |
data.total | number | Required | Number of requested device items Example: 2 |
data.success | number | Required | Successful renewal count Example: 2 |
data.failed | number | Required | Failed renewal count Example: 0 |
data.results[].kid | string | Required | Device KID Example: KID001 |
data.results[].old_expire_time | number | Required | Previous membership expiry timestamp. 0 means permanent Example: 1769675945 |
data.results[].new_expire_time | number | Required | New membership expiry timestamp. 0 means permanent Example: 1772267945 |
data.results[].new_expire_at | string | Required | Formatted new expiry time Example: 2026-02-28 15:04:05 |
Batch extend 30 days by KID
Use comma-separated kids with extend mode
Batch extend by UDID
For scenarios where only UDIDs are available. Multiple certificates under one UDID are updated by default
Set explicit expiry time
Use mode=set to set an explicit membership expiry timestamp
Set permanent
Use mode=permanent to make membership permanent
Per-device strategy
Each item can override global renewal options
Only update latest match for a UDID
With match=first, only the latest matched certificate under the same UDID is updated
Error Codes
122021Response Language
Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.
X-Lang: enzh, en, zh-TW, vi, arAccept-Language is also supported; X-Lang takes priority. Unsupported languages fall back to English.
Code Examples
curl -X POST "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/device/membership/renew" \
-H "X-Lang: en" \
-H "Content-Type: application/json" \
-d '{
"token": "your_api_token_here",
"mode": "extend",
"base": "auto",
"days": 30,
"seconds": 2592000,
"duration": "30d",
"expire_time": 1772267945,
"kid": "KID001",
"udid": "00008030-001234567890002E",
"kids": "KID001,KID002",
"udids": "00008030-001234567890002E",
"items": "[{\"kid\":\"KID001\",\"mode\":\"extend\",\"days\":30},{\"udid\":\"00008030-001234567890002E\",\"mode\":\"permanent\"}]",
"match": "all",
"continue_on_error": true
}'Notes
- This API only updates the device membership/certificate download expiry. It does not re-sign or charge balance
- 0 means permanent. In extend mode, permanent devices remain permanent by default; use base=now to force a finite expiry
- When a UDID matches multiple certificates, match=all updates all by default. Use first or error to change behavior
- Both JSON and form requests are supported. Form items may be a JSON array string
Try it in Console
Fill in the parameters below and send a request to test. Requests only go to this site's API; the URL is locked and cannot be changed, and your current login cookie is included.
https://testypro.iwai.cc/api/device/membership/renewLocked to this siteUser API token
Renew mode: extend, set, or permanent. Defaults to set when expire_time is provided, otherwise extend
Extend base: auto, current, or now
Days to add in extend mode
Seconds to add in extend mode. Higher priority than days
Duration expression: 30d, 12h, 60m, or 3600s
New expiry timestamp for set mode, seconds or milliseconds. 0 means permanent
Single device KID
Single device UDID
Device KID array. Comma/space/newline separated strings are also supported
Device UDID array. If one UDID has multiple certificates, match=all updates all by default. Comma/space/newline separated strings are also supported
Advanced batch items. Each item can include kid or udid and override mode/base/days/seconds/duration/expire_time
Multiple match handling: all, first, or error. Default all
Whether to continue after an item fails. Default true