Polyv Help Center

Help Center

Delete Material

Updated: 2026-02-27 11:14:52

API Description

1、删除账号下的素材,支持批量删除,支持删除到回收站或彻底删除。
2、接口支持https协议g't

API URL

https://api.polyv.net/live/v4/material/delete

Request Method

POST

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended to ensure interface security. API calls are subject to rate limits. Click here for details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId See Get Secret Key
timestamp true Long Current 13-digit millisecond timestamp, valid within 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must never be saved or used directly on the client side. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain response data. See Signature Generation Rules

Request Body Parameter Description

Parameter Required Type Description
materialIds true List<String> List of material IDs. The list length must be between 1 and 1000.
deleteCompletely false String Whether to delete permanently. Optional values:
Y: Permanently delete. Note that permanent deletion cannot be undone. Please proceed with caution.
N: Move to recycle bin.
Default is N if not provided.
allowPartialDelete false String Whether to allow partial deletion. Optional values:
Y: Allow partial deletion. If some materials fail to delete (e.g., due to non-existent IDs), other valid materials will still be deleted successfully.
N: Do not allow partial deletion. If any material fails to delete, the entire operation fails.
Default is N if not provided.

Example

https://api.polyv.net/live/v4/material/delete?appId=xxx&sign=A69559D6EBF130B9C0F60807459FC311&timestamp=1642733791590

Request Body Parameters

{
    "materialIds": ["xxx", "yyy"],
    "deleteCompletely": "Y",
    "allowPartialDelete": "Y"
}

Response Parameter Description

Parameter Type Description
code Integer Response status code. 200 indicates success, non-200 indicates failure.
status String Response result, determined by the business. Returns "success" on success, "error" on failure.
success Boolean Whether the request was successful.
requestId String Request ID, a unique UUID generated for each request. Used only for troubleshooting and debugging, not for business logic.
error Object Error information when the status code is non-200. See Error Field Description
data Object See Data Field Description

Error Parameter Description

Parameter Type Description
code Integer Error code, used to identify the specific error cause.
desc String Error description, corresponding to error.code.

Data Parameter Description

Parameter Type Description
failedMaterialIds List<String> List of material IDs that failed to delete. An empty list indicates no failures.

Response Example

For global system error descriptions, see Global Error Description

Success Example - All Deletions Successful

{
    "code": 200,
    "status": "success",
    "requestId": "1472d84d-7221-4221-b604-5c9ed07461ca",
    "data": {
        "failedMaterialIds": []
    },
    "success": true
}

Success Example - Partial Deletions Successful

{
    "code": 200,
    "status": "success",
    "requestId": "1472d84d-7221-4221-b604-5c9ed07461ca",
    "data": {
        "failedMaterialIds": ["xxx", "yyy"]
    },
    "success": true
}

Failure Example - Incorrect Material ID

{
    "code": 400,
    "status": "error",
    "requestId": "3b86d4c5-3dc2-472e-8a38-53e2b76502f3",
    "error": {
        "code": 62008,
        "desc": "素材不存在"
    },
    "data": null,
    "success": false
}

Error Example

{
  "code": 400,
  "status": "error",
  "error": {
    "code": 10003,
    "desc": "时间戳过期"
  },
  "success": false
}
联系客服,在线咨询