This topic describes how to call the UpdateKeywordLib operation to modify the basic information of 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: UpdateKeywordLib

You can call this operation to modify the basic information of a specified text library.

Request parameters

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

The following table describes the parameters in the request body.
Parameter Type Required Description
Id Numeric Yes The primary key ID of the text library.
Name String Yes The name of the text library.
BizTypes List No The business type of the custom text library that you set on the Moderation Policy tab (by choosing Settings > Moderation API).
Enable Boolean No Specifies whether to enable the text library. A value of true indicates that the text library is enabled, and a value of false indicates that the text library is disabled.

Response parameters

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

Examples

Sample requests
{
  "Id": 2147,
  "Name": "test2sdkdk",
  "BizTypes": []
}
Sample success responses
{
  "requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
  "code": 200
}