Deletes terms from a specified custom text library. You can use text libraries for text anti-spam. The effect of managing custom text libraries by calling API operations is the same as that of managing custom text libraries in the Alibaba Cloud Content Moderation console.

Description

Operation: DeleteKeyword
Note Deleted terms cannot be restored. Proceed with caution.

You can call this operation to delete terms or text patterns from a specified text library. For more information about how to construct an HTTP request, see Request structure. You can also select an existing HTTP request. For more information, see SDK overview.

Billing: This operation is free of charge.

QPS limit

You can send up to 10 requests per second to call this operation by using your Alibaba Cloud account. If you send an excessive number of requests, throttling is implemented, and your business may be affected.

Request parameters

For more information about the common request parameters that must be included in all Content Moderation API requests, see Common parameters.

The following table describes the parameters in the request body.
Parameter Type Required Example Description
Ids List No [1,2] The IDs of the terms to delete.
Note You must specify at least one of the Ids and Keywords parameters.
Keywords StringArray No ["keyword1","keyword2"] The terms to delete.
Note You must specify at least one of the Ids and Keywords parameters.
KeywordLibId String Yes 2147 The primary key ID of the text library.

Response parameters

For more information about common response parameters that this operation returns, see Common response parameters.

Examples

Sample requests
http(s)://green.cn-shanghai.aliyuncs.com/?
Action=DeleteKeyword
&<Common request parameters>
{
  "Id": [1,2]
  "KeywordLibId": "2147"
}
Sample success responses
{
  "requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
  "code": 200
}