tencent cloud

APIs

ModifyWebhookPolicy

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2026-09-01 10:18:59

1. API Description

Domain name for API request: csip.intl.tencentcloudapi.com.

Add or modify a notification policy. ID > 0 means modification; ID = 0 or not passed means adding new. When MemberAppIds is configured as empty, the policy only acts on current root account events; when not empty, it acts on the self account + listed member accounts at the same time.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyWebhookPolicy.
Version Yes String Common Params. The value used for this API: 2022-11-21.
Region No String Common Params. This parameter is not required.
Name Yes String

Policy Name
Input parameter limit: 1-20 characters, tenant-unique

Status Yes String

Enable status
Enumeration values:
ON: Enabled
OFF: Disabled

NotifyItems.N Yes Array of WebhookNotifyItem

List of notification items
Input parameter limit: at least 1 item. Module/SubModule must be a valid composite returned by DescribeWebhookNotifyItemTree

AssetScope Yes WebhookAssetScope

Asset scope for notification

ReceiveFormat Yes String

Accept format
Enumeration values:
TEXT: Text format
JSON: JSON format

ReceiverIDList.N Yes Array of Integer

Receiving robot ID list
Input limits: at least 1, up to 50

MemberId.N No Array of String

Group account member id

ID No Integer

Policy ID. More than 0 means modification; equal to 0 or not passed means adding new
Default value: 0

MsgLanguage No String

Push language
Enumeration values:
zh: Chinese
en: English
Default value: zh on the Chinese site and en on the international site

CustomFields.N No Array of WebhookCustomField

List of custom passthrough fields
Input limitation: Required when EnableCustomFields=true, up to 20

3. Output Parameters

Parameter Name Type Description
ID Integer

Newly-added or modified policy ID

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Example

Input Example

POST / HTTP/1.1
Host: csip.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyWebhookPolicy
<Common request parameters>

{
    "Name": "policy1",
    "Status": "ON",
    "NotifyItems": [
        {
            "Module": "Alert",
            "SubModule": "MALWARE_FILE",
            "Levels": [
                "HIGH"
            ]
        }
    ],
    "AssetScope": {
        "AssetRange": 1
    },
    "ReceiveFormat": "TEXT",
    "ReceiverIDList": [
        19
    ],
    "MemberId": [
        "mem-xxx"
    ],
    "ID": 5,
    "MsgLanguage": "zh"
}

Output Example

{
    "Response": {
        "ID": 5,
        "RequestId": "45347672-c912-4e38-a153-cb3cadf4eb53"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Ajuda e Suporte

Esta página foi útil?

comentários