Update Webhook Event Push Settings

Update Webhook event push settings, including Webhook URL, secret, request method, etc.

Request URL

POST {base_url}/{api_path}/webhook/update?access_token={access_token}

Request parameters

Parameter Required Type Description
webhook_event_push_list No Array<Webhook_Entry> The list of Webhook configuration entries.
webhook_event_push_timeout No Integer Specify the maximum time to wait for an HTTP response from the third-party application.

Valid value: 3 - 10

webhook_event_push_retry_count No Integer Specify the number of times a request can be retried when delivery fails or no successful response is received.

Valid value1 - 5

Webhook_Entry
Parameter Required Type Description
url Yes String Webhook URL.
secret Yes String Secret key corresponding to the specified Webhook URL.

The key is used to generate HMAC-SHA256 signatures for Webhook messages.

The recipient can use the key to verify the message's authenticity and integrity.

request_method Yes String HTTP request method for sending requests to the Webhook URL.
Valid value:
  • GET
  • POST
event_ids Yes Array<Integer> The ID list of events to be monitored.
Note:

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

POST /openapi/v1.0/extension_status_monitor/update?access_token=QytWnoLcod7RFB5f0S5oX4ORMbKPbU5t HTTP/1.1 
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "webhook_event_push_list": [
        {
            "event_ids": [
                30014,
                30032,
                30033
            ],
            "request_method": "POST",
            "secret": "mvM5JZeCqxDCMUdpgGzCTPGGbOcOouDr",
            "url": "https://webhook.site/070cb947-4ccf-40e3-a03c-a004ff05ad58"
        },
        {
            "event_ids": [
                30022
            ],
            "request_method": "GET",
            "secret": "qnIdTBxyGgn2LckZrFw7IVeTRMJf3XfM",
            "url": "https://webhook.site/38e9dea1-be68-4381-8a8c-f0623517f513"
        }
    ],
    "webhook_event_push_timeout": 3,
    "webhook_event_push_retry_count": 4
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}